maven-2groovymavengmaven-plugingroovydoc

GroovyDoc as Maven Plugin


Is there a maven plugin available somewhere that utilizes GroovyDoc, preferably as a report?

I guess GMaven would be the place to look but the docs are ancient (1.0, whereas the current version is 1.3) and the GMaven plugin doesn't have any mojo that fits as you can see:

mvn help:describe -DgroupId=org.codehaus.gmaven -DartifactId=gmaven-plugin

This plugin has 9 goals:

groovy:compile
Description: Compiles Groovy sources.

groovy:console
Description: Launches the Groovy GUI console.

groovy:execute
Description: Executes a Groovy script.

groovy:generateStubs
Description: Generate Java stubs from Groovy sources.

groovy:generateTestStubs
Description: Generate Java stubs from Groovy test sources.

groovy:help
Description: Display help information on gmaven-plugin.
Call
mvn groovy:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.

groovy:providers
Description: Displays information about the Groovy runtime providers which are configured and selected.

groovy:shell
Description: Launches the Groovy Shell (aka. groovysh).

groovy:testCompile
Description: Compiles Groovy test sources.

So does anyone have any pointers to a maven groovydoc plugin? Google didn't come up with anything meaningful.


Solution

  • You want the gmavenplus plugin: http://groovy.github.io/GMavenPlus/groovydoc-mojo.html

    <project>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmavenplus</groupId>
            <artifactId>gmavenplus-plugin</artifactId>
            <version>1.5</version>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy-all</artifactId>
          <!-- any version of Groovy \>= 1.5.0 (except 1.6 RC 1) should work here -->
          <version>2.4.7</version>
        </dependency>
      </dependencies>
    </project>
    

    and run: mvn gplus:generateStubs gplus:groovydoc