Question

What parts of a Grails application need to be stored in source-control? Some obvious parts that are needed:

  • grails-app directory
  • test directory
  • web-app directory

Now we reach questions like:

  • If we use a Grails plug-in (like gldapo), do we need to check in that plugin?
  • Do Grails plugins install in the Grails directory, or your project?

I'm not looking to start a religious war about .project, so please ignore that, but are there any "hidden" project files I need to worry about, along with the plugin issues?

Converted to a community wiki, as new versions of Grails have changed some of these solutions, especially as regards plugins.

Was it helpful?

Solution

  • You do not want ./plugins/core (Core Grails plugins) under SVN
  • You do not want anything under ./web-app/WEB-INF/ under SVN. You should not usually need to put files in here. Files from ./conf are copied to WEB-INF/classes so they are on the classpath, if you need to supply anything.

Here's a link to the docs describing in more detail.

OTHER TIPS

I would say, put all your project directory under versionning. Even the libs, it won't take that much disk space and you'll not change them so often.

To my point of view, it's somehow "safer" than relying on external tools such as maven to grab all the dependencies, especially when one of the dependecies silently upgrade and change a little bit its behaviour, introducing "bugs" in your own project.

After a bit more research, it seems that plugins for Grails are installed in the project directory, they don't change your Grails install. This means you'll need to install that plugin in each Grails project you want to use the functionality, and that the plugin is part of each project's source code.

These plugins are installed in the grails-app/plugins directory, so if you're already checking in the grails-app directory, all should be well.

There don't seem to be any "hidden files" that need checking in, though there are a few empty directories created when starting a new project that should be added to the source-control, as you'll probably add files to them at a later date.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top