views:

481

answers:

3

Which directories/files should be excluded when placing a Grails application under version control? I don't want non-source files or artifacts to be carried in SVN for my project.

A: 

You should exclude the "test/reports" directory in your root folder. It's also useful to exclude "stacktrace.log".

If you are using JS-Libraries you could think of excluding them too and write a little script for always getting the latest bugfix version. Modern JS-Libraries can be very large and it's not very useful to clutter your VCS with old versions of your frameworks. An exception is a jump to a new major version of a library or a tag. In this case you should definitely keep an old version.

Maximilian Schweitzer
Disagree with "You should exclude the "test" directory", you'd definitely want unit and integration tests under source control.
John Wagenleitner
You are right I meant the "test/reports" directory. Already changed it. Thank you.
Maximilian Schweitzer
+5  A: 

here's my .gitignore (it probably contains alot of junk)

.idea/
stacktrace.log
test/reports/
etc/errors.txt
bin-groovy/
.classpath
.project
*.war
web-app/plugins/
web-app/resources/
classes/
test/reports/

Note that this is for grails 1.1.1. (I think before grails 1.1, plugins were stored in /plugins instead of web-app/plugins.

Miguel Ping
+4  A: 

Grails.org has specific instructions on checking your project into SVN.

Ben Williams
Those are outdated for Grails 1.1.x
Kimble