Moves and Grails

There are some differences between Grails apps and Java apps that present challenges for Moves (and Maven).

One challenge is that the standard "packaging" type specified in the pom file for a Grails app is "grails-app": but the artifact being built ends up as a "war" file (assuming we are dealing with a web app). There are several places in both Moves and the MIT Maven repository web interface that assume the artifact file suffix is the same as the packaging type, and in the case of a Grails app, this assumption is false.

Moves has been modified to handle Grails apps, and here's what you need to know to configure a Grails app in Moves:

1. The Grails app cannot have range dependencies (e.g. <version>[0.0.0,999.999.999)</version> ) in its pom file - the Grails-Maven plugin does not understand this version specifier. So CSF dependencies, for example, must have an explicit release number (e.g. <version>2.0.24</version> ).

2. The Grails app will have a packaging type of "grails-app" specified in its pom file. Despite this, when the "Managed Application" is defined in Moves -> Admin -> Stacks, you must select "war" as the value for the packaging parameter. This will ensure that when we are deploying the artifact to Maven, or retrieving it from Maven, the ".war" file suffix will be used, and the artifact will be located correctly.

3. The war file will be deployed to Maven with the file suffix ".war", but if you try to download it from the Maven web interface, Maven will look for an artifact with file suffix "grails-app" - because it assumes that pom packaging = file suffix. It's fiddly, but if you can figure out the URL behind the artifact, you can change "grails-app" to "war" in the URL and the download should then work.

  • No labels