public abstract class AbstractTentackleAnnotationProcessingMojo extends AbstractTentackleMojo
Picks up all annotations annotated with org.tentackle.common.Analyze.
| Modifier and Type | Field and Description |
|---|---|
protected String |
encoding
Source file encode.
|
protected List<AbstractTentackleProcessor> |
processors
Annotation processors.
|
protected boolean |
showCompileOutput
Show compile output.
|
charset, filesets, mavenProject, resourceDirs, verbosity, verbosityLevel| Constructor and Description |
|---|
AbstractTentackleAnnotationProcessingMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProcessor(AbstractTentackleProcessor processor)
Adds an annotation processor.
|
protected void |
cleanupProcessors(File srcDir)
Cleans up the processors.
|
protected void |
createMissingDirs()
Creates any missing directories.
|
void |
execute() |
protected String[] |
filterFileNames(String dirName,
String[] fileNames)
Filters the files to be processed.
If overridden, allows to skip the annotation processing. |
void |
finishExecute()
Finishes the execution.
|
ClassLoader |
getProcessingClassloader()
Gets a classloader that searches also in the classpath elements of the project.
|
protected void |
initializeProcessor(AbstractTentackleProcessor processor,
File srcDir)
Initializes a processor.
|
protected void |
initializeProcessors(File srcDir)
Initializes all processors.
|
void |
prepareExecute()
Prepares the execution.
Invoked before validate(). |
void |
setMojoParameters(File sourceDir,
List<String> classpathElements)
Sets the mojo parameters.
|
protected void |
validate()
Checks the configuration.
|
determineEncoding, determineVerbosity, findResourceDirs, getCanonicalPath, getPathRelativeToBasedir, getResourceDirName@Parameter(defaultValue="${tentackle.showCompileOutput}")
protected boolean showCompileOutput
@Parameter(defaultValue="${project.build.sourceEncoding}")
protected String encoding
protected List<AbstractTentackleProcessor> processors
public AbstractTentackleAnnotationProcessingMojo()
public void setMojoParameters(File sourceDir, List<String> classpathElements) throws org.apache.maven.plugin.MojoFailureException
sourceDir - the directory holding the sources to be processedclasspathElements - the mavenProject classpathorg.apache.maven.plugin.MojoFailureException - if classloader could not be createdpublic ClassLoader getProcessingClassloader()
public void addProcessor(AbstractTentackleProcessor processor)
processor - the annotation processorprotected void createMissingDirs()
public void prepareExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException - if an unexpected problem occurs.org.apache.maven.plugin.MojoFailureException - if an expected problem occurs.public void finishExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException - if an unexpected problem occurs.org.apache.maven.plugin.MojoFailureException - if an expected problem occurs.public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void validate()
throws org.apache.maven.plugin.MojoExecutionException
AbstractTentackleMojovalidate in class AbstractTentackleMojoorg.apache.maven.plugin.MojoExecutionException - if validation failedprotected void initializeProcessor(AbstractTentackleProcessor processor, File srcDir) throws org.apache.maven.plugin.MojoFailureException
processor - the annotation processorsrcDir - the source dirorg.apache.maven.plugin.MojoFailureException - if initialization failedprotected void initializeProcessors(File srcDir) throws org.apache.maven.plugin.MojoFailureException
srcDir - the current file set directoryorg.apache.maven.plugin.MojoFailureException - if initialization failedprotected void cleanupProcessors(File srcDir) throws org.apache.maven.plugin.MojoFailureException
srcDir - the current file set directoryorg.apache.maven.plugin.MojoFailureException - if cleanup failedprotected String[] filterFileNames(String dirName, String[] fileNames)
dirName - the base directoryfileNames - the file names relative to the directoryTentackle - a domain driven enterprise framework