Package org.apache.maven.plugin.compiler
Class TestCompilerMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.compiler.AbstractCompilerMojo
-
- org.apache.maven.plugin.compiler.TestCompilerMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="testCompile", defaultPhase=TEST_COMPILE, threadSafe=true, requiresDependencyResolution=TEST) public class TestCompilerMojo extends AbstractCompilerMojoCompiles application test sources. By default uses the javac compiler of the JDK used to execute Maven. This can be overwritten through Toolchains or parameterAbstractCompilerMojo.compilerId.- Since:
- 2.0
- Author:
- Jason van Zyl
- See Also:
- javac Command
-
-
Field Summary
-
Fields inherited from class org.apache.maven.plugin.compiler.AbstractCompilerMojo
compilerArgs, compilerArgument, compilerArguments, PS, release, source, target
-
-
Constructor Summary
Constructors Constructor Description TestCompilerMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected java.util.List<java.lang.String>getClasspathElements()protected java.lang.StringgetCompilerArgument()protected java.util.Map<java.lang.String,java.lang.String>getCompilerArguments()protected java.util.List<java.lang.String>getCompileSourceRoots()protected java.lang.StringgetDebugFileName()protected java.util.Set<java.lang.String>getExcludes()protected java.io.FilegetGeneratedSourcesDirectory()protected java.util.Set<java.lang.String>getIncludes()protected java.util.List<java.lang.String>getModulepathElements()protected java.io.FilegetOutputDirectory()protected java.util.Map<java.lang.String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor>getPathElements()protected java.lang.StringgetRelease()protected java.lang.StringgetSource()protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScannergetSourceInclusionScanner(int staleMillis)protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScannergetSourceInclusionScanner(java.lang.String inputFileEnding)protected java.lang.StringgetTarget()protected booleanisTestCompile()protected voidpreparePaths(java.util.Set<java.io.File> sourceFiles)-
Methods inherited from class org.apache.maven.plugin.compiler.AbstractCompilerMojo
getBuildStartTime, getJavaMajorVersion, getModuleDeclaration, getProject, getProjectOutputDirectories, getRequestThreadCount, getToolchain, setRelease, setTarget
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, CompilationFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractCompilerMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionCompilationFailureException
-
getCompileSourceRoots
protected java.util.List<java.lang.String> getCompileSourceRoots()
- Specified by:
getCompileSourceRootsin classAbstractCompilerMojo
-
getPathElements
protected java.util.Map<java.lang.String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> getPathElements()
- Specified by:
getPathElementsin classAbstractCompilerMojo
-
getClasspathElements
protected java.util.List<java.lang.String> getClasspathElements()
- Specified by:
getClasspathElementsin classAbstractCompilerMojo
-
getModulepathElements
protected java.util.List<java.lang.String> getModulepathElements()
- Specified by:
getModulepathElementsin classAbstractCompilerMojo
-
getOutputDirectory
protected java.io.File getOutputDirectory()
- Specified by:
getOutputDirectoryin classAbstractCompilerMojo
-
preparePaths
protected void preparePaths(java.util.Set<java.io.File> sourceFiles)
- Specified by:
preparePathsin classAbstractCompilerMojo
-
getSourceInclusionScanner
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(int staleMillis)
- Specified by:
getSourceInclusionScannerin classAbstractCompilerMojo
-
getSourceInclusionScanner
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(java.lang.String inputFileEnding)
- Specified by:
getSourceInclusionScannerin classAbstractCompilerMojo
-
getSource
protected java.lang.String getSource()
- Specified by:
getSourcein classAbstractCompilerMojo
-
getTarget
protected java.lang.String getTarget()
- Specified by:
getTargetin classAbstractCompilerMojo
-
getRelease
protected java.lang.String getRelease()
- Specified by:
getReleasein classAbstractCompilerMojo
-
getCompilerArgument
protected java.lang.String getCompilerArgument()
- Specified by:
getCompilerArgumentin classAbstractCompilerMojo
-
getCompilerArguments
protected java.util.Map<java.lang.String,java.lang.String> getCompilerArguments()
- Specified by:
getCompilerArgumentsin classAbstractCompilerMojo
-
getGeneratedSourcesDirectory
protected java.io.File getGeneratedSourcesDirectory()
- Specified by:
getGeneratedSourcesDirectoryin classAbstractCompilerMojo
-
getDebugFileName
protected java.lang.String getDebugFileName()
- Specified by:
getDebugFileNamein classAbstractCompilerMojo
-
isTestCompile
protected boolean isTestCompile()
- Overrides:
isTestCompilein classAbstractCompilerMojo
-
getIncludes
protected java.util.Set<java.lang.String> getIncludes()
- Specified by:
getIncludesin classAbstractCompilerMojo
-
getExcludes
protected java.util.Set<java.lang.String> getExcludes()
- Specified by:
getExcludesin classAbstractCompilerMojo
-
-