Class PluginDescriptorFilesGenerator
java.lang.Object
org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator
- All Implemented Interfaces:
Generator
Serializes
- a standard Maven Plugin Descriptor XML file
- a descriptor containing a limited set of attributes for
PluginHelpGenerator - an enhanced descriptor containing HTML values for some elements (instead of plain text as for the other two)
for
invalid reference
PluginXdocGenerator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enumThe type of the plugin descriptor file -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(File destinationDirectory, PluginToolsRequest request) Execute the generation for a given plugin descriptor.static FilegetEnhancedDescriptorFilePath(org.apache.maven.project.MavenProject project) private StringgetExpression(org.apache.maven.plugin.descriptor.Parameter parameter) Get the expression value, eventually surrounding it with${ }.(package private) static URIgetJavadocUrlForType(JavadocLinkGenerator javadocLinkGenerator, String type) private static StringgetTextValue(PluginDescriptorFilesGenerator.DescriptorType type, boolean containsXhtmlValue, String text) private Stringprotected voidprocessMojoDescriptor(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor, org.codehaus.plexus.util.xml.XMLWriter w, PluginDescriptorFilesGenerator.DescriptorType type, JavadocLinkGenerator javadocLinkGenerator) voidwriteDescriptor(File destinationFile, PluginToolsRequest request, PluginDescriptorFilesGenerator.DescriptorType type) protected voidwriteParameterType(org.codehaus.plexus.util.xml.XMLWriter w, PluginDescriptorFilesGenerator.DescriptorType type, JavadocLinkGenerator javadocLinkGenerator, org.apache.maven.plugin.descriptor.Parameter parameter, String goal) Writes parameter type information and potentially also the related javadoc URL.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG
-
-
Constructor Details
-
PluginDescriptorFilesGenerator
public PluginDescriptorFilesGenerator()
-
-
Method Details
-
execute
public void execute(File destinationDirectory, PluginToolsRequest request) throws GeneratorException Description copied from interface:GeneratorExecute the generation for a given plugin descriptor.- Specified by:
executein interfaceGenerator- Parameters:
destinationDirectory- requiredrequest- required- Throws:
GeneratorException- if any
-
getEnhancedDescriptorFilePath
-
getVersion
-
writeDescriptor
public void writeDescriptor(File destinationFile, PluginToolsRequest request, PluginDescriptorFilesGenerator.DescriptorType type) throws IOException - Throws:
IOException
-
getTextValue
private static String getTextValue(PluginDescriptorFilesGenerator.DescriptorType type, boolean containsXhtmlValue, String text) - Parameters:
type-containsXhtmlValue-text-- Returns:
- the normalized text value (i.e. potentially converted to XHTML)
-
processMojoDescriptor
protected void processMojoDescriptor(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor, org.codehaus.plexus.util.xml.XMLWriter w, PluginDescriptorFilesGenerator.DescriptorType type, JavadocLinkGenerator javadocLinkGenerator) -
writeParameterType
protected void writeParameterType(org.codehaus.plexus.util.xml.XMLWriter w, PluginDescriptorFilesGenerator.DescriptorType type, JavadocLinkGenerator javadocLinkGenerator, org.apache.maven.plugin.descriptor.Parameter parameter, String goal) Writes parameter type information and potentially also the related javadoc URL.- Parameters:
w-type-javadocLinkGenerator-parameter-goal-
-
getJavadocUrlForType
-
getExpression
Get the expression value, eventually surrounding it with${ }.- Parameters:
parameter- the parameter- Returns:
- the expression value
-