Package org.tentackle.maven.plugin
Class AbstractAnalyzeAnnotationProcessingMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.tentackle.maven.AbstractTentackleMojo
org.tentackle.maven.AbstractTentackleAnnotationProcessingMojo
org.tentackle.maven.plugin.AbstractAnalyzeAnnotationProcessingMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AnalyzeAnnotationProcessingMojo,AnalyzeTestAnnotationProcessingMojo
public abstract class AbstractAnalyzeAnnotationProcessingMojo
extends AbstractTentackleAnnotationProcessingMojo
Generates code and meta-information prior to wurbeling and compiling the sources.
Processes up all annotations annotated with @Analyze, such as @Service.
Processing results are either written to files in analyzeDir or placed on heap
for being picked up by wurblets, depending on the handler implementation for
each annotation.
- Author:
- harald
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringOptional generated index holding the generated services.
Example: <index>META-INF/RESOURCE-INDEX.LIST</index>Fields inherited from class org.tentackle.maven.AbstractTentackleAnnotationProcessingMojo
compilerArgs, compilerArgument, encoding, filesets, processors, showCompileOutputFields inherited from class org.tentackle.maven.AbstractTentackleMojo
charset, JDK_TOOLCHAIN, minLogLevel, verbosity, verbosityLevelFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanupProcessors(File srcDir) protected voidCreates any missing directories.protected String[]filterFileNames(String dirName, String[] fileNames) voidprotected voidinitializeProcessor(org.tentackle.buildsupport.AbstractTentackleProcessor processor, File srcDir) voidsetMojoParameters(File sourceDir, File analyzeDir, File servicesDir, List<String> classpathElements) Sets the mojo parameters.protected booleanvalidate()Methods inherited from class org.tentackle.maven.AbstractTentackleAnnotationProcessingMojo
addProcessor, executeImpl, getCompileErrorLog, getProcessingClassloader, getTotalCompileErrors, getTotalErrors, initializeProcessors, setMojoParametersMethods inherited from class org.tentackle.maven.AbstractTentackleMojo
createFileSetManager, createPackageMap, determineEncoding, determineJavaToolVersion, determineVerbosity, execute, getCanonicalPath, getHostName, getIncludedFiles, getJavaHome, getMajorVersion, getMavenProject, getMavenSession, getMojoExecution, getPathRelativeToBasedir, getResourceDir, getResourceDirs, getSettings, getSettingsDecrypter, getToolchain, getToolchain, getToolchain, getToolchainManager, getToolFinder, installJavaLoggingHandler, isExecutionRecursive, isSkippedByDefault, loadResourceFileIntoString, prepareExecute, toDescriptorNameMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
index
Optional generated index holding the generated services.
Example: <index>META-INF/RESOURCE-INDEX.LIST</index>
-
-
Constructor Details
-
AbstractAnalyzeAnnotationProcessingMojo
public AbstractAnalyzeAnnotationProcessingMojo()Creates a mojo.
-
-
Method Details
-
setMojoParameters
public void setMojoParameters(File sourceDir, File analyzeDir, File servicesDir, List<String> classpathElements) throws org.apache.maven.plugin.MojoFailureException Sets the mojo parameters.- Parameters:
sourceDir- the directory holding the sources to be processedanalyzeDir- the directory holding the analyze-resultsservicesDir- the directory holding the generated servicesclasspathElements- the mavenProject classpath- Throws:
org.apache.maven.plugin.MojoFailureException- if classloader could not be created
-
validate
protected boolean validate() throws org.apache.maven.plugin.MojoExecutionException- Overrides:
validatein classAbstractTentackleAnnotationProcessingMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createMissingDirs
protected void createMissingDirs()Creates any missing directories.- Overrides:
createMissingDirsin classAbstractTentackleAnnotationProcessingMojo
-
initializeProcessor
protected void initializeProcessor(org.tentackle.buildsupport.AbstractTentackleProcessor processor, File srcDir) throws org.apache.maven.plugin.MojoFailureException - Overrides:
initializeProcessorin classAbstractTentackleAnnotationProcessingMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
cleanupProcessors
- Overrides:
cleanupProcessorsin classAbstractTentackleAnnotationProcessingMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
filterFileNames
- Overrides:
filterFileNamesin classAbstractTentackleAnnotationProcessingMojo
-
finishExecute
public void finishExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Overrides:
finishExecutein classAbstractTentackleMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-