Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Build tools for Grails applications
1. Which build tool for
Grails applications?
Presented by Rimero Solutions Inc
– Java Development Consulting
– WWW: http://rimerosolutions.com
Note: Feel free to use or distribute this presentation as you please.
How will you build your next great
Grails application??
2. Summary
When “foreign” technologies are
introduced to a company, build
processes can generate lots of
discussions.
– Can we build the same way?
– If not, what is our best option? What are
the best practices?
This presentation gives a very high level
overview of available options : Maven
3.x, Grails 2.x, Gradle 1.4+, Ant 1.6+.
4. 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 let's say
Maven.
● The process is simple until you try to get
fancy (deployment automation, etc.).
● Many easy tutorials on the Internet.
5. 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.
6. Building with Ant
● Integration instructions:
http://grails.org/doc/latest/guide/commandLine.html#antAndMaven
● Ant integration doesn't 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).
7. Building with Gradle
● The Gradle plugin can be found on
Github. https://github.com/grails/grails-gradle-plugin
● Somehow, the plugin doesn't 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.
8. 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
you've got an Ant centric toolchain.
● The Gradle integration is not tight
enough, but there's hope. Grails 3.0 is
supposed to switch to Gradle.