Class AbstractAnnotationProcessorMojo

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

    public abstract class AbstractAnnotationProcessorMojo
    extends org.apache.maven.plugin.AbstractMojo
    Author:
    bsorrentino
    • Field Detail

      • project

        @Parameter(defaultValue="${project}",
                   readonly=true)
        protected org.apache.maven.project.MavenProject project
      • skip

        @Parameter(defaultValue="false",
                   property="skipAnnotationProcessing")
        protected boolean skip
        Set this to true to skip annotation processing.
        Since:
        3.1.0
      • fork

        @Parameter(defaultValue="false",
                   property="fork")
        protected boolean fork
        Allows running the compiler in a separate process. If false it uses the built in compiler, while if true it will use an executable. to set source and target use
          maven.processor.source
          maven.processor.target
         
        Since:
        3.3
      • session

        @Parameter(defaultValue="${session}",
                   readonly=true)
        protected org.apache.maven.execution.MavenSession session
        Maven Session
        Since:
        3.3
      • compilerManager

        @Component
        protected org.codehaus.plexus.compiler.manager.CompilerManager compilerManager
        Plexus compiler manager.
        Since:
        3.3
    • Constructor Detail

      • AbstractAnnotationProcessorMojo

        public AbstractAnnotationProcessorMojo()
    • Method Detail

      • getSourceDirectories

        protected abstract Set<File> getSourceDirectories​(Set<File> result)
        Returns:
        supported source directories
      • getOutputClassDirectory

        protected abstract File getOutputClassDirectory()
        Returns:
        output folder
      • addCompileSourceRoot

        protected abstract void addCompileSourceRoot​(org.apache.maven.project.MavenProject project,
                                                     String dir)
        Parameters:
        project -
        dir -
      • getDefaultOutputDirectory

        public abstract File getDefaultOutputDirectory()
        Returns:
      • getResourcesElements

        protected abstract Set<String> getResourcesElements​(Set<String> result)
      • getClasspathElements

        protected abstract Set<String> getClasspathElements​(Set<String> result)
      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException