Fork me on GitHub

Plugin Documentation

This report describes goals, parameters details, requirements and sample usage of this plugin.

Goals

Goals available for this plugin:

Goal Description
gplus:addSources This mojo adds Groovy sources to the project's sources.
gplus:addStubSources Adds Groovy stubs directory back to Maven's list of source directories. Normally, you won't need to use this mojo.
gplus:addTestSources This mojo adds Groovy test sources to the project's test sources.
gplus:addTestStubSources Adds Groovy test stubs directory back to Maven's list of test source directories. Normally, you won't need to use this mojo.
gplus:compile Compiles the main sources. Note that this mojo requires Groovy >= 1.5.0, and >= 2.0.0-beta-3 (the indy version) for compiling with invokedynamic option.
gplus:compileTests Compiles the test sources. Note that this mojo requires Groovy >= 1.5.0, and >= 2.0.0-beta-3 (the indy version) for compiling with invokedynamic option.
gplus:console Launches a Groovy console window bound to the current project. Note that this mojo requires Groovy >= 1.5.0. Note that it references the plugin classloader to pull in dependencies Groovy didn't include (for things like Ant for AntBuilder, Ivy for @grab, and Jansi for Groovysh). Note that using the ant property requires Java 8, as the included Ant version was compiled for Java 8.
gplus:execute Executes Groovy scripts (in the pom or external), bound to the current project. Note that this mojo requires Groovy >= 1.5.0. Note that it references the plugin classloader to pull in dependencies Groovy didn't include (for things like Ant for AntBuilder, Ivy for @grab, and Jansi for Groovysh).
gplus:generateStubs Generates stubs for the main Groovy sources and adds them to Maven's sources for the Maven compiler plugin to find. Note that this mojo requires Groovy >= 1.8.2.
gplus:generateTestStubs Generates stubs for the test Groovy sources and adds them to Maven's test sources for the Maven compiler plugin to find. Note that this mojo requires Groovy >= 1.8.2.
gplus:groovydoc Generates GroovyDoc for the main sources.
gplus:groovydoc-jar Create a GroovyDoc jar for the main sources. Note by default this will also invoke the groovydoc goal (unless invokeGroovyDoc is false).
gplus:groovydocTests Generates GroovyDoc for the test sources.
gplus:groovydocTests-jar Create a GroovyDoc jar for the test sources. Note by default this will also invoke the groovydocTests goal (unless invokeGroovyDoc is false).
gplus:help Display help information on gmavenplus-plugin.
Call mvn gplus:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
gplus:removeStubs This mojo removes Groovy stubs from the project's sources.
gplus:removeTestStubs This mojo removes Groovy test stubs from the project's sources.
gplus:shell Launches a Groovy shell bound to the current project. Note that this mojo requires Groovy >= 1.5.0. Note that it references the plugin ClassLoader to pull in dependencies Groovy didn't include (for things like Ant for AntBuilder, Ivy for @grab, and Jansi for Groovysh).

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.6.3
JDK 1.8

System Requirements History

The following specifies the minimum requirements to run this Maven plugin for historical versions:

Plugin Version Maven JDK
from 4.0.0 to 4.0.1 3.6.3 8
from 3.0.0 to 3.0.2 3.2.5 8
from 2.0.0 to 2.1.0 3.0 8
from 1.9.0 to 1.13.1 3.0 7
from 1.6 to 1.8.1 3.0.1 6
from 1.0-beta-1 to 1.5 2.2.1 5

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.gmavenplus</groupId>
          <artifactId>gmavenplus-plugin</artifactId>
          <version>4.0.1</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"