Which build tool for Grails applications? Presented by Rimero Solutions Inc – Java Development Consulting – WWW: http://rimerosolutions.comNote: Feel free to use or distribute this presentation as you please. How will you build your next great Grails application??
SummaryWhen “foreign” technologies areintroduced to a company, buildprocesses can generate lots ofdiscussions. – Can we build the same way? – If not, what is our best option? What are the best practices?This presentation gives a very high leveloverview of available options : Maven3.x, Grails 2.x, Gradle 1.4+, Ant 1.6+.
Default Grails tooling● Gant(http://gant.codehaus.org/) is the build tool used behind the scenes.● Cannot chain commands unless you either modify the Grails launcher or write custom global scripts.● There are not that many build related Grails plugins compared to lets say Maven.● The process is simple until you try to get fancy (deployment automation, etc.).● Many easy tutorials on the Internet.
Building with Maven● Interesting mainly for Maven users http://grails.org/doc/latest/guide/commandLine.html#antAndMaven● Maven is powerful with tons of plugins. By default, you can easily have encrypted credentials for repositories that require authentication.● Not all the build options can be moved to the Maven POM, especially true for plugins (generation of the plugin XML descriptor file → non Maven users).● Not many Web resources, can be tough to get help for advanced questions.
Building with Ant● Integration instructions: http://grails.org/doc/latest/guide/commandLine.html#antAndMaven● Ant integration doesnt seem reliable/stable.● Depending on your Grails version you may run into class not found issues, etc.● If you must use Ant, wrap shell commands to the Grails command line (Local Grails installation required).
Building with Gradle● The Gradle plugin can be found on Github. https://github.com/grails/grails-gradle-plugin● Somehow, the plugin doesnt look right in its current state. The plugin looks like a rough hook to bootstrap commands.● It would be nice to forget about grails- app/conf/BuildConfig.groovy and only deal with Gradle build files.● Gradle itself is kind of the best of Maven with an ease of use and scripting power.● Gradle IDE support is not that mature.
Which build tool will you use?● At this time, the simplest build solution is to rely on the default built-in tooling.● Maven is more powerful, but verbose, and it may introduce challenges for newcomers (new to Grails and Maven).● Ant is difficult to recommend unless youve got an Ant centric toolchain.● The Gradle integration is not tight enough, but theres hope. Grails 3.0 is supposed to switch to Gradle.