MainAnnotationProcessorMojo, TestAnnotationProcessorMojopublic abstract class AbstractAnnotationProcessorMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field | Description |
|---|---|---|
protected org.codehaus.plexus.compiler.manager.CompilerManager |
compilerManager |
Plexus compiler manager.
|
protected boolean |
fork |
Allows running the compiler in a separate process.
|
protected org.apache.maven.project.MavenProject |
project |
|
protected org.eclipse.aether.RepositorySystemSession |
repoSession |
The current repository/network configuration of Maven.
|
protected org.apache.maven.execution.MavenSession |
session |
Maven Session
|
protected boolean |
skip |
Set this to true to skip annotation processing.
|
protected boolean |
skipSourcesUnchanged |
Set this to true to skip annotation processing when there are no changes in the source files
compared to the generated files.
|
| Constructor | Description |
|---|---|
AbstractAnnotationProcessorMojo() |
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract void |
addCompileSourceRoot(org.apache.maven.project.MavenProject project,
java.lang.String dir) |
|
protected java.util.Optional<java.lang.String> |
buildProcessorPath() |
|
void |
execute() |
|
protected abstract java.util.List<java.lang.String> |
getAllCompileSourceRoots() |
|
protected abstract java.util.Set<java.lang.String> |
getClasspathElements(java.util.Set<java.lang.String> result) |
|
abstract java.io.File |
getDefaultOutputDirectory() |
|
protected abstract java.io.File |
getOutputClassDirectory() |
|
protected abstract java.util.Set<java.lang.String> |
getResourcesElements(java.util.Set<java.lang.String> result) |
|
protected abstract java.util.Set<java.io.File> |
getSourceDirectories(java.util.Set<java.io.File> result) |
@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${repositorySystemSession}",
readonly=true)
protected org.eclipse.aether.RepositorySystemSession repoSession
@Parameter(defaultValue="false",
property="skipAnnotationProcessing")
protected boolean skip
@Parameter(defaultValue="false",
property="fork")
protected boolean fork
to set source and target use
maven.processor.source maven.processor.target
@Parameter(defaultValue="false",
property="skipSourcesUnchangedAnnotationProcessing")
protected boolean skipSourcesUnchanged
@Parameter(defaultValue="${session}",
readonly=true)
protected org.apache.maven.execution.MavenSession session
@Component protected org.codehaus.plexus.compiler.manager.CompilerManager compilerManager
protected abstract java.util.Set<java.io.File> getSourceDirectories(java.util.Set<java.io.File> result)
protected abstract java.io.File getOutputClassDirectory()
protected abstract void addCompileSourceRoot(org.apache.maven.project.MavenProject project,
java.lang.String dir)
project - dir - public abstract java.io.File getDefaultOutputDirectory()
protected abstract java.util.Set<java.lang.String> getResourcesElements(java.util.Set<java.lang.String> result)
protected abstract java.util.Set<java.lang.String> getClasspathElements(java.util.Set<java.lang.String> result)
protected abstract java.util.List<java.lang.String> getAllCompileSourceRoots()
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected java.util.Optional<java.lang.String> buildProcessorPath()
Copyright © 2009–2021. All rights reserved.