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
Fields Modifier and Type Field Description protected StringindexOptional 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, showCompileOutput
-
Fields inherited from class org.tentackle.maven.AbstractTentackleMojo
charset, JDK_TOOLCHAIN, minLogLevel, resourceDirs, verbosity, verbosityLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractAnalyzeAnnotationProcessingMojo()Creates a mojo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanupProcessors(File srcDir)protected voidcreateMissingDirs()Creates any missing directories.protected String[]filterFileNames(String dirName, String[] fileNames)voidfinishExecute()protected 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, setMojoParameters
-
Methods inherited from class org.tentackle.maven.AbstractTentackleMojo
createPackageMap, determineEncoding, determineJavaToolVersion, determineVerbosity, execute, findResourceDirs, getCanonicalPath, getHostName, getMajorVersion, getMavenProject, getMavenSession, getMojoExecution, getPathRelativeToBasedir, getResourceDirName, getSettings, getSettingsDecrypter, getToolchain, getToolchain, getToolchain, getToolchainManager, getToolFinder, installJavaLoggingHandler, isExecutionRecursive, isSkippedByDefault, loadResourceFileIntoString, prepareExecute
-
-
-
-
Field Detail
-
index
@Parameter protected String index
Optional generated index holding the generated services.
Example: <index>META-INF/RESOURCE-INDEX.LIST</index>
-
-
Method Detail
-
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
protected void cleanupProcessors(File srcDir) throws org.apache.maven.plugin.MojoFailureException
- Overrides:
cleanupProcessorsin classAbstractTentackleAnnotationProcessingMojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
filterFileNames
protected String[] filterFileNames(String dirName, String[] fileNames)
- 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
-
-