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 attributes for PluginHelpGenerator
    3. an enhanced descriptor containing HTML values for some elements (instead of plain text as for the other two) for PluginXdocGenerator
    from a given in-memory descriptor. The in-memory descriptor acting as source is supposed to contain XHTML values for description elements.
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
    • Constructor Detail

      • PluginDescriptorFilesGenerator

        public PluginDescriptorFilesGenerator()
    • Method Detail

      • getEnhancedDescriptorFilePath

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

        private java.lang.String getVersion()
      • getTextValue

        private static java.lang.String getTextValue​(PluginDescriptorFilesGenerator.DescriptorType type,
                                                     boolean containsXhtmlValue,
                                                     java.lang.String text)
        Parameters:
        type -
        containsXhtmlValue -
        text -
        Returns:
        the normalized text value (i.e. potentially converted to XHTML)
      • writeParameterType

        protected void writeParameterType​(org.codehaus.plexus.util.xml.XMLWriter w,
                                          PluginDescriptorFilesGenerator.DescriptorType type,
                                          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 -
      • getJavadocUrlForType

        static java.net.URI getJavadocUrlForType​(JavadocLinkGenerator javadocLinkGenerator,
                                                 java.lang.String type)
      • getExpression

        private java.lang.String getExpression​(org.apache.maven.plugin.descriptor.Parameter parameter)
        Get the expression value, eventually surrounding it with ${ }.
        Parameters:
        parameter - the parameter
        Returns:
        the expression value