Getting Groovy With Ant
By Adrian Sutton
In the comments for my post Ant Is Cool, Erik Hatcher points out that Groovy has ant support (see http://groovy.codehaus.org/Ant+Scripting). While that’s cool and all, I really don’t want to add a new language into the mix just to call out to Ant so not a great option for my case, but useful to know. What is more useful however is knowing that you can embed Groovy in ant scripts using the Groovy ant task (also via the ant script task since 1.5 or 1.6 I think).
In fact about the time that Erik was posting his comment, I was playing around with the Groovy ant task to extract commit messages out of subversion to build change logs (complete with which build the commit was first put into and filtering stuff etc). With the power of Groovy and the SVNClientAdapter Java classes it all came together quite nicely.
The killer feature of Groovy is definitely the clean integration of existing Java classes. The biggest problem was making ant’s classpath and classloaders play nice.