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 Details

    • index

      @Parameter protected String 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 processed
      analyzeDir - the directory holding the analyze-results
      servicesDir - the directory holding the generated services
      classpathElements - 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:
      validate in class AbstractTentackleAnnotationProcessingMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • createMissingDirs

      protected void createMissingDirs()
      Creates any missing directories.
      Overrides:
      createMissingDirs in class AbstractTentackleAnnotationProcessingMojo
    • initializeProcessor

      protected void initializeProcessor(org.tentackle.buildsupport.AbstractTentackleProcessor processor, File srcDir) throws org.apache.maven.plugin.MojoFailureException
      Overrides:
      initializeProcessor in class AbstractTentackleAnnotationProcessingMojo
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • cleanupProcessors

      protected void cleanupProcessors(File srcDir) throws org.apache.maven.plugin.MojoFailureException
      Overrides:
      cleanupProcessors in class AbstractTentackleAnnotationProcessingMojo
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • filterFileNames

      protected String[] filterFileNames(String dirName, String[] fileNames)
      Overrides:
      filterFileNames in class AbstractTentackleAnnotationProcessingMojo
    • finishExecute

      public void finishExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Overrides:
      finishExecute in class AbstractTentackleMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException