Class GenerateStubsMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="generateStubs",
          defaultPhase=GENERATE_SOURCES,
          requiresDependencyResolution=COMPILE,
          threadSafe=true)
    public class GenerateStubsMojo
    extends AbstractGenerateStubsMojo
    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.
    Since:
    1.0-beta-1
    • Field Detail

      • sources

        @Parameter
        protected org.apache.maven.shared.model.fileset.FileSet[] sources
        The Groovy source files (relative paths). Default: "${project.basedir}/src/main/groovy/**/*.groovy"
      • stubsOutputDirectory

        @Parameter(defaultValue="${project.build.directory}/generated-sources/groovy-stubs/main")
        protected java.io.File stubsOutputDirectory
        The location for the compiled classes.
    • Constructor Detail

      • GenerateStubsMojo

        public GenerateStubsMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Executes this mojo.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If an unexpected problem occurs (causes a "BUILD ERROR" message to be displayed)