Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Blah, blah, blah

gmaven-archetype-mojo Archetype

To help get Groovy plugins started faster, you can use the gmaven-archetype-mojo. This will create a new project with the basic POM configuration and an example Groovy-based Mojo class to get you started quickly:

mvn archetype:generate -DarchetypeGroupId=org.codehaus.groovy.maven.archetypes -DarchetypeArtifactId=gmaven-archetype-mojo

The Maven Archetype Plugin will ask a few questions and then spit out a new Maven project for you:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[WARNING] No archetype repository found. Falling back to central repository (http://repo1.maven.org/maven2). 
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
[INFO] snapshot org.codehaus.groovy.maven.archetypes:gmaven-archetype-mojo:1.0-beta-4-SNAPSHOT: checking for updates from gmaven-archetype-mojo-repo
Define value for groupId: : a.b.c
Define value for artifactId: : a-b-c
Define value for version: : 1.0
Define value for package: : a.b.c
Confirm properties configuration:
name: Example Maven Plugin
groupId: a.b.c
artifactId: a-b-c
version: 1.0
package: a.b.c
 Y: : 
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/groovy/HelloMojo.groovy [line 37,column 31] : ${message} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/groovy/HelloMojo.groovy [line 42,column 18] : ${message} is not a valid reference.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30 seconds
[INFO] Finished at: Tue Apr 08 14:00:45 ICT 2008
[INFO] Final Memory: 7M/13M
[INFO] ------------------------------------------------------------------------
Icon

Please ignore the ReferenceException warnings about ${message}.

gmaven-plugin Packaging

Icon

TODO

  • No labels