Class DefaultMojoAnnotationsScanner

java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner
All Implemented Interfaces:
MojoAnnotationsScanner, org.codehaus.plexus.logging.LogEnabled

@Component(role=MojoAnnotationsScanner.class) public class DefaultMojoAnnotationsScanner extends org.codehaus.plexus.logging.AbstractLogEnabled implements MojoAnnotationsScanner
Since:
3.0
Author:
Olivier Lamy
  • Constructor Details

    • DefaultMojoAnnotationsScanner

      public DefaultMojoAnnotationsScanner()
  • Method Details

    • scan

      public Map<String,MojoAnnotatedClass> scan(MojoAnnotationsScannerRequest request) throws org.apache.maven.tools.plugin.extractor.ExtractionException
      Description copied from interface: MojoAnnotationsScanner
      Scan classes for mojo annotations.
      Specified by:
      scan in interface MojoAnnotationsScanner
      Returns:
      map of mojo-annotated classes keyed by full class name
      Throws:
      org.apache.maven.tools.plugin.extractor.ExtractionException
    • scan

      protected void scan(Map<String,MojoAnnotatedClass> mojoAnnotatedClasses, File source, List<String> includePatterns, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo) throws IOException, org.apache.maven.tools.plugin.extractor.ExtractionException
      Throws:
      IOException
      org.apache.maven.tools.plugin.extractor.ExtractionException
    • scanArchive

      protected Map<String,MojoAnnotatedClass> scanArchive(File archiveFile, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo) throws IOException, org.apache.maven.tools.plugin.extractor.ExtractionException
      Parameters:
      archiveFile -
      artifact -
      excludeMojo - for dependencies, we exclude Mojo annotations found
      Returns:
      annotated classes found
      Throws:
      IOException
      org.apache.maven.tools.plugin.extractor.ExtractionException
    • scanDirectory

      protected Map<String,MojoAnnotatedClass> scanDirectory(File classDirectory, List<String> includePatterns, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo) throws IOException, org.apache.maven.tools.plugin.extractor.ExtractionException
      Parameters:
      classDirectory -
      includePatterns -
      artifact -
      excludeMojo - for dependencies, we exclude Mojo annotations found
      Returns:
      annotated classes found
      Throws:
      IOException
      org.apache.maven.tools.plugin.extractor.ExtractionException
    • populateAnnotationContent

      protected void populateAnnotationContent(Object content, MojoAnnotationVisitor mojoAnnotationVisitor) throws org.codehaus.plexus.util.reflection.ReflectorException
      Throws:
      org.codehaus.plexus.util.reflection.ReflectorException
    • analyzeVisitors

      protected void analyzeVisitors(MojoClassVisitor mojoClassVisitor) throws org.apache.maven.tools.plugin.extractor.ExtractionException
      Throws:
      org.apache.maven.tools.plugin.extractor.ExtractionException