Class PluginDescriptorFilesGenerator

  • All Implemented Interfaces:
    Generator

    public class PluginDescriptorFilesGenerator
    extends java.lang.Object
    implements Generator
    Serializes
    1. a standard Maven Plugin Descriptor XML file
    2. a descriptor containing a limited set of elements for PluginHelpGenerator
    3. an enhanced descriptor containing HTML values for some elements (instead of plain text as for the other two) for org.apache.maven.plugin.plugin.report.GoalRenderer
    from a given in-memory descriptor. The in-memory descriptor acting as source is supposed to contain XHTML values for description elements.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(java.io.File destinationDirectory, org.apache.maven.tools.plugin.PluginToolsRequest request)
      Execute the generation for a given plugin descriptor.
      static java.io.File getEnhancedDescriptorFilePath​(org.apache.maven.project.MavenProject project)  
      protected void processMojoDescriptor​(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor, org.codehaus.plexus.util.xml.XMLWriter w, org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator.DescriptorType type, org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator javadocLinkGenerator)  
      void writeDescriptor​(java.io.File destinationFile, org.apache.maven.tools.plugin.PluginToolsRequest request, org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator.DescriptorType type)  
      protected void writeParameterType​(org.codehaus.plexus.util.xml.XMLWriter w, org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator.DescriptorType type, org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator javadocLinkGenerator, org.apache.maven.plugin.descriptor.Parameter parameter, java.lang.String goal)
      Writes parameter type information and potentially also the related javadoc URL.
      • Methods inherited from class java.lang.Object

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

      • PluginDescriptorFilesGenerator

        public PluginDescriptorFilesGenerator()
    • Method Detail

      • execute

        public void execute​(java.io.File destinationDirectory,
                            org.apache.maven.tools.plugin.PluginToolsRequest request)
                     throws GeneratorException
        Description copied from interface: Generator
        Execute the generation for a given plugin descriptor.
        Specified by:
        execute in interface Generator
        Parameters:
        destinationDirectory - required
        request - required
        Throws:
        GeneratorException - if any
      • getEnhancedDescriptorFilePath

        public static java.io.File getEnhancedDescriptorFilePath​(org.apache.maven.project.MavenProject project)
      • writeDescriptor

        public void writeDescriptor​(java.io.File destinationFile,
                                    org.apache.maven.tools.plugin.PluginToolsRequest request,
                                    org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator.DescriptorType type)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • processMojoDescriptor

        protected void processMojoDescriptor​(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor,
                                             org.codehaus.plexus.util.xml.XMLWriter w,
                                             org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator.DescriptorType type,
                                             org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator javadocLinkGenerator)
      • writeParameterType

        protected void writeParameterType​(org.codehaus.plexus.util.xml.XMLWriter w,
                                          org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator.DescriptorType type,
                                          org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator javadocLinkGenerator,
                                          org.apache.maven.plugin.descriptor.Parameter parameter,
                                          java.lang.String goal)
        Writes parameter type information and potentially also the related javadoc URL.
        Parameters:
        w -
        type -
        javadocLinkGenerator -
        parameter -
        goal -