logo GMavenPlus Plugin

Integrates Groovy into Maven projects.

homepage: groovy.github.io/GMavenPlus
fresh index:
last release: 2 months ago, first release: 9 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
gplus:addSources (phase: initialize)

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 (phase: initialize)

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 (phase: 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 (phase: test-compile)

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 (phase: generate-sources)

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 (phase: generate-test-sources)

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 (phase: package)

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 (phase: package)

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 (phase: compile)

This mojo removes Groovy stubs from the project's sources.

gplus:removeTestStubs (phase: test-compile)

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).

Often used code snippets:

<plugin>
  <groupId>org.codehaus.gmavenplus</groupId>
  <artifactId>gmavenplus-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>addTestSources</goal>
        <goal>testCompile</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.gmavenplus</groupId>
  <artifactId>gmavenplus-plugin</artifactId>
  <version>1.5</version>
  <executions>
    <execution>
      <goals>
        <goal>compile</goal>
        <goal>testCompile</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.gmavenplus</groupId>
  <artifactId>gmavenplus-plugin</artifactId>
  <version>1.4</version>
  <executions>
    <execution>
      <goals>
        <goal>compile</goal>
        <goal>testCompile</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.gmavenplus</groupId>
  <artifactId>gmavenplus-plugin</artifactId>
  <version>1.5</version>
  <executions>
    <execution>
      <goals>
        <goal>addSources</goal>
        <goal>addTestSources</goal>
        <goal>generateStubs</goal>
        <goal>compile</goal>
        <goal>testGenerateStubs</goal>
        <goal>testCompile</goal>
        <goal>removeStubs</goal>
        <goal>removeTestStubs</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.gmavenplus</groupId>
  <artifactId>gmavenplus-plugin</artifactId>
  <version>1.5</version>
  <executions>
    <execution>
      <goals>
        <goal>addTestSources</goal>
        <goal>testCompile</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.