Class TestCompilerMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    TestCompilerMojo

    @Mojo(name="testCompile",
          defaultPhase=TEST_COMPILE,
          threadSafe=true,
          requiresDependencyResolution=TEST)
    public class TestCompilerMojo
    extends AbstractCompilerMojo
    Compiles application test sources.
    Since:
    2.0
    • Field Detail

      • skip

        @Parameter(property="maven.test.skip")
        private boolean skip
        Set this to 'true' to bypass compilation of test sources. Its use is NOT RECOMMENDED, but quite convenient on occasion.
      • compileSourceRoots

        @Parameter(defaultValue="${project.testCompileSourceRoots}",
                   readonly=true,
                   required=true)
        private java.util.List<java.lang.String> compileSourceRoots
        The source directories containing the test-source to be compiled.
      • outputDirectory

        @Parameter(defaultValue="${project.build.testOutputDirectory}",
                   required=true,
                   readonly=true)
        private java.io.File outputDirectory
        The directory where compiled test classes go.
      • testIncludes

        @Parameter
        private java.util.Set<java.lang.String> testIncludes
        A list of inclusion filters for the compiler.
      • testExcludes

        @Parameter
        private java.util.Set<java.lang.String> testExcludes
        A list of exclusion filters for the compiler.
      • testSource

        @Parameter(property="maven.compiler.testSource")
        private java.lang.String testSource
        The -source argument for the test Java compiler.
        Since:
        2.1
      • testTarget

        @Parameter(property="maven.compiler.testTarget")
        private java.lang.String testTarget
        The -target argument for the test Java compiler.
        Since:
        2.1
      • testRelease

        @Parameter(property="maven.compiler.testRelease")
        private java.lang.String testRelease
        the -release argument for the test Java compiler
        Since:
        3.6
      • testCompilerArguments

        @Parameter
        private java.util.Map<java.lang.String,​java.lang.String> testCompilerArguments

        Sets the arguments to be passed to test compiler (prepending a dash) if fork is set to true.

        This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.

        Since:
        2.1
      • testCompilerArgument

        @Parameter
        private java.lang.String testCompilerArgument

        Sets the unformatted argument string to be passed to test compiler if fork is set to true.

        This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.

        Since:
        2.1
      • generatedTestSourcesDirectory

        @Parameter(defaultValue="${project.build.directory}/generated-test-sources/test-annotations")
        private java.io.File generatedTestSourcesDirectory

        Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+

        Since:
        2.2
      • compilePath

        @Parameter(defaultValue="${project.compileClasspathElements}",
                   readonly=true)
        private java.util.List<java.lang.String> compilePath
      • testPath

        @Parameter(defaultValue="${project.testClasspathElements}",
                   readonly=true)
        private java.util.List<java.lang.String> testPath
      • locationManager

        @Component
        private org.codehaus.plexus.languages.java.jpms.LocationManager locationManager
      • pathElements

        private java.util.Map<java.lang.String,​org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> pathElements
      • classpathElements

        private java.util.Collection<java.lang.String> classpathElements
      • modulepathElements

        private java.util.Collection<java.lang.String> modulepathElements
    • Constructor Detail

      • TestCompilerMojo

        public TestCompilerMojo()