Monday, October 13, 2008

GMaven (Groovy + Maven)

I love Groovy and I love Maven but it was a bit of a pain at first to get GMaven working.

To make a long story short, my solution was to use the following parameters:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate \
-DarchetypeGroupId=org.codehaus.groovy.maven.archetypes \
-DarchetypeArtifactId=gmaven-archetype-basic \
-DarchetypeVersion=1.0-rc-3

The real "gem" is having to specify the "2.0-alpha-3" since that's when the generate goal came into practice instead of the old-school "archetype:create." Once this is fixed, you'd be able to just do "archetype:generate." Also, once if the jira passes then you no longer will have to specifry the archetypeVersion, a parameter often missed by n00bs like myself.

G'luck!

No comments: