@Mojo(name="compile", defaultPhase=COMPILE, threadSafe=true, requiresDependencyResolution=COMPILE) public class CompilerMojo extends AbstractCompilerMojo
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
classpathElements |
private java.util.List<java.lang.String> |
compilePath |
private java.util.List<java.lang.String> |
compileSourceRoots
The source directories containing the sources to be compiled.
|
private java.util.Set<java.lang.String> |
excludes
A list of exclusion filters for the compiler.
|
private java.io.File |
generatedSourcesDirectory
Specify where to place generated source files created by annotation processing.
|
private java.util.Set<java.lang.String> |
includes
A list of inclusion filters for the compiler.
|
private java.util.List<java.lang.String> |
modulepathElements |
private java.io.File |
outputDirectory
The directory for compiled classes.
|
private org.apache.maven.artifact.Artifact |
projectArtifact
Projects main artifact.
|
private boolean |
skipMain
Set this to 'true' to bypass compilation of main sources.
|
compilerArgs, compilerArgument, compilerArguments, DEFAULT_SOURCE, DEFAULT_TARGET, MODULE_INFO_TARGET, release, source, target
Constructor and Description |
---|
CompilerMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected java.util.List<java.lang.String> |
getClasspathElements() |
protected java.lang.String |
getCompilerArgument() |
protected java.util.Map<java.lang.String,java.lang.String> |
getCompilerArguments() |
protected java.util.List<java.lang.String> |
getCompileSourceRoots() |
protected java.io.File |
getGeneratedSourcesDirectory() |
protected java.util.List<java.lang.String> |
getModulepathElements() |
protected java.io.File |
getOutputDirectory() |
protected java.lang.String |
getRelease() |
protected java.lang.String |
getSource() |
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner |
getSourceInclusionScanner(int staleMillis) |
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner |
getSourceInclusionScanner(java.lang.String inputFileEnding) |
protected java.lang.String |
getTarget() |
protected void |
preparePaths(java.util.Set<java.io.File> sourceFiles) |
convertToCompilerResult, getBuildStartTime, getProject, getRequestThreadCount, isDependencyChanged, isTestCompile
@Parameter(defaultValue="${project.compileSourceRoots}", readonly=true, required=true) private java.util.List<java.lang.String> compileSourceRoots
@Parameter(defaultValue="${project.build.outputDirectory}", required=true, readonly=true) private java.io.File outputDirectory
@Parameter(defaultValue="${project.artifact}", readonly=true, required=true) private org.apache.maven.artifact.Artifact projectArtifact
@Parameter private java.util.Set<java.lang.String> includes
@Parameter private java.util.Set<java.lang.String> excludes
@Parameter(defaultValue="${project.build.directory}/generated-sources/annotations") private java.io.File generatedSourcesDirectory
Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+
@Parameter(property="maven.main.skip") private boolean skipMain
@Parameter(defaultValue="${project.compileClasspathElements}", readonly=true, required=true) private java.util.List<java.lang.String> compilePath
private java.util.List<java.lang.String> classpathElements
private java.util.List<java.lang.String> modulepathElements
protected java.util.List<java.lang.String> getCompileSourceRoots()
getCompileSourceRoots
in class AbstractCompilerMojo
protected java.util.List<java.lang.String> getClasspathElements()
getClasspathElements
in class AbstractCompilerMojo
protected java.util.List<java.lang.String> getModulepathElements()
getModulepathElements
in class AbstractCompilerMojo
protected java.io.File getOutputDirectory()
getOutputDirectory
in class AbstractCompilerMojo
public void execute() throws org.apache.maven.plugin.MojoExecutionException, CompilationFailureException
execute
in interface org.apache.maven.plugin.Mojo
execute
in class AbstractCompilerMojo
org.apache.maven.plugin.MojoExecutionException
CompilationFailureException
protected void preparePaths(java.util.Set<java.io.File> sourceFiles)
preparePaths
in class AbstractCompilerMojo
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(int staleMillis)
getSourceInclusionScanner
in class AbstractCompilerMojo
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(java.lang.String inputFileEnding)
getSourceInclusionScanner
in class AbstractCompilerMojo
protected java.lang.String getSource()
getSource
in class AbstractCompilerMojo
protected java.lang.String getTarget()
getTarget
in class AbstractCompilerMojo
protected java.lang.String getRelease()
getRelease
in class AbstractCompilerMojo
protected java.lang.String getCompilerArgument()
getCompilerArgument
in class AbstractCompilerMojo
protected java.util.Map<java.lang.String,java.lang.String> getCompilerArguments()
getCompilerArguments
in class AbstractCompilerMojo
protected java.io.File getGeneratedSourcesDirectory()
getGeneratedSourcesDirectory
in class AbstractCompilerMojo