public abstract class AbstractCompileMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractCompileMojo.AccessRulesViolation |
static class |
AbstractCompileMojo.Debug |
static class |
AbstractCompileMojo.Proc |
static class |
AbstractCompileMojo.Sourcepath |
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
annotationProcessors
Names of annotation processors to run.
|
protected String |
compilerId
The compiler id of the compiler to use, one of
javac, forked-javac or jdt. |
protected AbstractCompileMojo.Proc |
proc
Sets whether annotation processing is performed or not.
|
protected org.apache.maven.project.MavenProject |
project |
protected AbstractCompileMojo.Sourcepath |
sourcepath
Controls compilation sourcepath.
|
| Constructor and Description |
|---|
AbstractCompileMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addGeneratedSources(org.apache.maven.project.MavenProject project) |
void |
execute() |
protected abstract List<org.apache.maven.artifact.Artifact> |
getClasspathArtifacts() |
protected Set<File> |
getDirectDependencies() |
protected abstract Set<String> |
getExcludes() |
protected abstract File |
getGeneratedSourcesDirectory() |
protected abstract Set<String> |
getIncludes() |
protected abstract File |
getMainOutputDirectory() |
protected abstract Set<String> |
getMainSourceRoots() |
protected abstract File |
getOutputDirectory() |
protected List<File> |
getProcessorpath() |
Charset |
getSourceEncoding() |
protected abstract Set<String> |
getSourceRoots() |
protected abstract boolean |
isSkip() |
@Parameter(property="maven.compiler.compilerId",
defaultValue="javac")
protected String compilerId
javac, forked-javac or jdt.@Parameter protected AbstractCompileMojo.Proc proc
Sets whether annotation processing is performed or not. This parameter is required if annotation processors are present on compile classpath.
Allowed values are:
proc - both compilation and annotation processing are performed at the same time.none - no annotation processing is performed.only - only annotation processing is done, no compilation.@Parameter protected String[] annotationProcessors
Names of annotation processors to run. If not set, the default annotation processors discovery process applies.
@Parameter protected AbstractCompileMojo.Sourcepath sourcepath
disable, compilation sourcepath will be empty. If set to reactorProjects, compilation sourcepath will be set to compile source roots (or
test compile source roots) of dependency projects of the same reactor build. The default is reactorProjects if proc=only, otherwise the default is disable.
The main usecase is proc:only annotation processing bound to generate-sources build phase. During mvn clean generate-sources execution, the reactor dependencies classes are not
available and referenced types can only be resolved from java sources.http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javac.html#BHCJJJAJ@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
public Charset getSourceEncoding()
protected abstract File getOutputDirectory()
protected abstract List<org.apache.maven.artifact.Artifact> getClasspathArtifacts()
protected abstract File getGeneratedSourcesDirectory()
protected abstract boolean isSkip()
protected abstract File getMainOutputDirectory()
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected abstract void addGeneratedSources(org.apache.maven.project.MavenProject project)
Copyright © 2017. All rights reserved.