Class GenerateTestStubsMojo

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

@Mojo(name="generateTestStubs", defaultPhase=GENERATE_TEST_SOURCES, requiresDependencyResolution=TEST, threadSafe=true) public class GenerateTestStubsMojo extends AbstractGenerateStubsMojo
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.
Since:
1.0-beta-1
Author:
Keegan Witt
  • Field Details

    • testSources

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

      @Parameter(defaultValue="${project.build.directory}/generated-sources/groovy-stubs/test") protected File testStubsOutputDirectory
      The location for the compiled test classes.
    • skipTests

      @Parameter(property="maven.test.skip", defaultValue="false") protected boolean skipTests
      Flag to allow test stub generation to be skipped.
  • Constructor Details

    • GenerateTestStubsMojo

      public GenerateTestStubsMojo()
  • Method Details

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