How do I create a grails war file so that it doesn't have the version number
(e.g. foo-0.1.war)
attached to the end when I execute the 'grails war' command?
How do I create a grails war file so that it doesn't have the version number
(e.g. foo-0.1.war)
attached to the end when I execute the 'grails war' command?
I think you can specify the war name in the war command.
grails war foo.war
If that doesn't work, check out this other way from http://jasonrudolph.com/gswg_faq.html
Grails 0.5 introduced a means for capturing and tracking various meta-data about your application. You can find the default meta-data in racetrack/application.properties. Inside, you'll see a property named app.version, and you'll notice that its value is 0.1.
From the Grails Documentation, Chapter 17, Deployment
There are also many ways in which you can customise the WAR file that is created. For example, you can specify a path (either absolute or relative) to the command that instructs it where to place the file and what name to give it:
grails war /opt/java/tomcat-5.5.24/foobar.war
Alternatively, you can add a line to Config.groovy that changes the default location and filename:
grails.war.destFile = "foobar-prod.war"
Of course, any command line argument that you provide overrides this setting.
Rolling up the other excellent answers. There are several options:
Explicitly set it on the command line: grails war foo.war
Set the app.version
property to empty in application.properties will cause the war to be named foo.war
.
Explicitly set the name of the war using the grails.war.destFile
property in Config.groovy