Class JavaAnnotationsMojoDescriptorExtractor

  • All Implemented Interfaces:
    org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor, org.codehaus.plexus.logging.LogEnabled

    @Named("java-annotations")
    @Singleton
    public class JavaAnnotationsMojoDescriptorExtractor
    extends org.codehaus.plexus.logging.AbstractLogEnabled
    implements org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
    JavaMojoDescriptorExtractor, a MojoDescriptor extractor to read descriptors from java classes with annotations. Notice that source files are also parsed to get description, since and deprecation information.
    Since:
    3.0
    Author:
    Olivier Lamy
    • Constructor Detail

      • JavaAnnotationsMojoDescriptorExtractor

        public JavaAnnotationsMojoDescriptorExtractor()
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
      • isDeprecated

        public boolean isDeprecated()
        Specified by:
        isDeprecated in interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
      • getGroupKey

        public org.apache.maven.tools.plugin.extractor.GroupKey getGroupKey()
        Specified by:
        getGroupKey in interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
      • execute

        public java.util.List<org.apache.maven.plugin.descriptor.MojoDescriptor> execute​(org.apache.maven.tools.plugin.PluginToolsRequest request)
                                                                                  throws org.apache.maven.tools.plugin.extractor.ExtractionException,
                                                                                         org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
        Specified by:
        execute in interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
        Throws:
        org.apache.maven.tools.plugin.extractor.ExtractionException
        org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
      • populateDataFromJavadoc

        protected void populateDataFromJavadoc​(com.thoughtworks.qdox.JavaProjectBuilder javaProjectBuilder,
                                               java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses,
                                               java.util.Map<java.lang.String,​com.thoughtworks.qdox.model.JavaClass> javaClassesMap,
                                               org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator linkGenerator)
        from sources scan to get @since and @deprecated and description of classes and fields.
      • discoverClasses

        protected java.util.Map<java.lang.String,​com.thoughtworks.qdox.model.JavaClass> discoverClasses​(com.thoughtworks.qdox.JavaProjectBuilder builder)
      • extendJavaProjectBuilderWithSourcesJar

        protected void extendJavaProjectBuilderWithSourcesJar​(com.thoughtworks.qdox.JavaProjectBuilder builder,
                                                              org.apache.maven.artifact.Artifact artifact,
                                                              org.apache.maven.tools.plugin.PluginToolsRequest request,
                                                              java.lang.String classifier)
                                                       throws org.apache.maven.tools.plugin.extractor.ExtractionException
        Throws:
        org.apache.maven.tools.plugin.extractor.ExtractionException
      • getFromProjectReferences

        protected org.apache.maven.project.MavenProject getFromProjectReferences​(org.apache.maven.artifact.Artifact artifact,
                                                                                 org.apache.maven.project.MavenProject project)