cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BURGHARD √Čric <>
Subject maven2 groovy plugin archetype
Date Mon, 21 Nov 2005 10:32:15 GMT

Thanks to you (i'm just a follower :-), i switch my building scripts from
jelly+ant to a better maven 2 build cycle model. maven was on my todo list
since a long time, and i must admit that it has overcome my expectations.

To help the jelly migration i wrote an archetype for writing quickly groovy
plugins. It is based on codehaus' groovy plugin which i transform in a
groovy-plugin api.

For example the simpler groovy plugin is just a matter of

1. defining and empty class java (just used by maven to bind the plugin to a
goal with javadoc annotations)

 * A plugin that execute a groovy script when requested
 * to achieve the 'test' goal.
 * @goal test
 * @description Test Groovy Mojo
public class MyMojo
    extends AbstractMojo

2. write a MyMojo.groovy script and put it on the right place
3. mvn install
4. use your groovy script on your with a mvn test:test.

With the archetype just do a

mvn archetype:create \
  -DgroupId=my.maven \
  -DpackageName=my.maven.test \
  -DartifactId=maven-test-plugin \
  -DarchetypeVersion=1.0 \

Copy your script to the right place, mvn install and your are done.

Perhaps it could be usefull for you, so you can find the sources on a svn
repository (the server is not always online: no-ip rulez :-)

Install procedure and usage are explained in an apt doc.

I'm dreaming of a cocoon-webapp archetype to start as easily a new webapp
based on cocoon with the blocks of my choice. thank you guys, for all this
great work on blocks + maven 2.


View raw message