public class PluginHelpGenerator extends org.codehaus.plexus.logging.AbstractLogEnabled implements Generator
HelpMojo class from help-class-source.vm template.
The generated mojo reads help content from META-INF/maven/${groupId}/${artifactId}/plugin-help.xml
resource, which is generated by this PluginDescriptorGenerator.
Notice that the help mojo source needs to be generated before compilation, but when Java 5 annotations are used,
plugin descriptor content is available only after compilation (detecting annotations in .class files):
help mojo source can be generated with empty package only (and no plugin descriptor available yet), then needs
to be updated after compilation - through rewriteHelpMojo(PluginToolsRequest, Log) which is called from
plugin descriptor XML generation.
| Constructor and Description |
|---|
PluginHelpGenerator()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.io.File destinationDirectory,
org.apache.maven.tools.plugin.PluginToolsRequest request)
Execute the generation for a given plugin descriptor.
|
org.codehaus.plexus.velocity.VelocityComponent |
getVelocityComponent() |
PluginHelpGenerator |
setHelpPackageName(java.lang.String helpPackageName) |
PluginHelpGenerator |
setVelocityComponent(org.codehaus.plexus.velocity.VelocityComponent velocityComponent) |
public void execute(java.io.File destinationDirectory,
org.apache.maven.tools.plugin.PluginToolsRequest request)
throws GeneratorException
execute in interface GeneratordestinationDirectory - requiredrequest - requiredGeneratorException - if anypublic PluginHelpGenerator setHelpPackageName(java.lang.String helpPackageName)
public org.codehaus.plexus.velocity.VelocityComponent getVelocityComponent()
public PluginHelpGenerator setVelocityComponent(org.codehaus.plexus.velocity.VelocityComponent velocityComponent)