@Mojo(name="compile",
defaultPhase=COMPILE,
threadSafe=true,
requiresDependencyResolution=COMPILE)
public class CompilerMojo
extends AbstractCompilerMojo
| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowPartialRequirements |
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 org.codehaus.plexus.languages.java.jpms.LocationManager |
locationManager |
private java.util.List<java.lang.String> |
modulepathElements |
private java.io.File |
outputDirectory
The directory for compiled classes.
|
private java.util.Map<java.lang.String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> |
pathElements |
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, PS, release, source, target| Constructor and Description |
|---|
CompilerMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected java.util.List<java.lang.String> |
getClasspathElements() |
private java.util.List<java.io.File> |
getCompileClasspathElements(org.apache.maven.project.MavenProject project) |
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.util.Map<java.lang.String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> |
getPathElements() |
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) |
private void |
writeBoxedWarning(java.lang.String message) |
convertToCompilerResult, getBuildStartTime, getProject, getRequestThreadCount, getToolchain, 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
@Parameter private boolean allowPartialRequirements
@Component private org.codehaus.plexus.languages.java.jpms.LocationManager locationManager
private java.util.List<java.lang.String> classpathElements
private java.util.List<java.lang.String> modulepathElements
private java.util.Map<java.lang.String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> pathElements
protected java.util.List<java.lang.String> getCompileSourceRoots()
getCompileSourceRoots in class AbstractCompilerMojoprotected java.util.List<java.lang.String> getClasspathElements()
getClasspathElements in class AbstractCompilerMojoprotected java.util.List<java.lang.String> getModulepathElements()
getModulepathElements in class AbstractCompilerMojoprotected java.util.Map<java.lang.String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> getPathElements()
getPathElements in class AbstractCompilerMojoprotected java.io.File getOutputDirectory()
getOutputDirectory in class AbstractCompilerMojopublic void execute()
throws org.apache.maven.plugin.MojoExecutionException,
CompilationFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class AbstractCompilerMojoorg.apache.maven.plugin.MojoExecutionExceptionCompilationFailureExceptionprotected void preparePaths(java.util.Set<java.io.File> sourceFiles)
preparePaths in class AbstractCompilerMojoprivate java.util.List<java.io.File> getCompileClasspathElements(org.apache.maven.project.MavenProject project)
protected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(int staleMillis)
getSourceInclusionScanner in class AbstractCompilerMojoprotected org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner getSourceInclusionScanner(java.lang.String inputFileEnding)
getSourceInclusionScanner in class AbstractCompilerMojoprotected java.lang.String getSource()
getSource in class AbstractCompilerMojoprotected java.lang.String getTarget()
getTarget in class AbstractCompilerMojoprotected java.lang.String getRelease()
getRelease in class AbstractCompilerMojoprotected java.lang.String getCompilerArgument()
getCompilerArgument in class AbstractCompilerMojoprotected java.util.Map<java.lang.String,java.lang.String> getCompilerArguments()
getCompilerArguments in class AbstractCompilerMojoprotected java.io.File getGeneratedSourcesDirectory()
getGeneratedSourcesDirectory in class AbstractCompilerMojoprivate void writeBoxedWarning(java.lang.String message)