Class AbstractAnalyzeAnnotationProcessingMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AnalyzeAnnotationProcessingMojo, AnalyzeTestAnnotationProcessingMojo

    public abstract class AbstractAnalyzeAnnotationProcessingMojo
    extends org.tentackle.maven.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 java.lang.String index
      Optional 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, resourceDirs, verbosity, verbosityLevel
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void cleanupProcessors​(java.io.File srcDir)  
      protected void createMissingDirs()
      Creates any missing directories.
      protected java.lang.String[] filterFileNames​(java.lang.String dirName, java.lang.String[] fileNames)  
      void finishExecute()  
      protected void initializeProcessor​(org.tentackle.buildsupport.AbstractTentackleProcessor processor, java.io.File srcDir)  
      void setMojoParameters​(java.io.File sourceDir, java.io.File analyzeDir, java.io.File servicesDir, java.util.List<java.lang.String> classpathElements)
      Sets the mojo parameters.
      protected boolean validate()  
      • Methods inherited from class org.tentackle.maven.AbstractTentackleAnnotationProcessingMojo

        addProcessor, executeImpl, getCompileErrorLog, getProcessingClassloader, getTotalCompileErrors, getTotalErrors, initializeProcessors, setMojoParameters
      • Methods inherited from class org.tentackle.maven.AbstractTentackleMojo

        determineEncoding, determineJavaToolVersion, determineVerbosity, execute, findResourceDirs, getCanonicalPath, getMajorVersion, getMavenProject, getMavenSession, getMojoExecution, getPathRelativeToBasedir, getResourceDirName, getSettings, getSettingsDecrypter, getToolchain, getToolchain, getToolchain, getToolchainManager, getToolFinder, isExecutionRecursive, isSkippedByDefault, loadResourceFileIntoString, prepareExecute
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • index

        @Parameter
        protected java.lang.String index
        Optional generated index holding the generated services.
        Example: <index>META-INF/RESOURCE-INDEX.LIST</index>
    • Constructor Detail

      • AbstractAnalyzeAnnotationProcessingMojo

        public AbstractAnalyzeAnnotationProcessingMojo()
        Creates a mojo.
    • Method Detail

      • setMojoParameters

        public void setMojoParameters​(java.io.File sourceDir,
                                      java.io.File analyzeDir,
                                      java.io.File servicesDir,
                                      java.util.List<java.lang.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 org.tentackle.maven.AbstractTentackleAnnotationProcessingMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • createMissingDirs

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

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

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

        protected java.lang.String[] filterFileNames​(java.lang.String dirName,
                                                     java.lang.String[] fileNames)
        Overrides:
        filterFileNames in class org.tentackle.maven.AbstractTentackleAnnotationProcessingMojo
      • finishExecute

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