Java Reference
In-Depth Information
5.4.2. The GMaven project
GMaven is an alternative approach for adding Groovy into Maven projects. It works with
combined Java and Groovy sources by generating stubs for the Groovy files as part of the
build sequence.
To help users get started, the project provides a Maven archetype called gmaven-
archetype-basic . To use the archetype, execute the following at the command line:
> mvn archetype:generate -DgroupId=mjg -DartifactId=weather
-DarchetypeArtifactId=gmaven-archetype-basic
-Dversion=1.0-SNAPSHOT -Dpackage=mjg
This again produces a project in standard Maven structure, in which the sources are in src/
main/groovy and the tests are in src/test/groovy. The plugin expects both Java and Groovy
sources to reside in those directories.
The generated POM is shown in the following listing, with some modifications discussed
in the listing.
Search WWH ::




Custom Search