Class PluginHelpGenerator
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.apache.maven.tools.plugin.generator.PluginHelpGenerator
-
- All Implemented Interfaces:
Generator
,org.codehaus.plexus.logging.LogEnabled
public class PluginHelpGenerator extends org.codehaus.plexus.logging.AbstractLogEnabled implements Generator
Generates anHelpMojo
class fromhelp-class-source.vm
template. The generated mojo reads help content fromMETA-INF/maven/${groupId}/${artifactId}/plugin-help.xml
resource, which is generated by thisPluginDescriptorGenerator
.Notice that the help mojo source needs to be generated before compilation, but when Java 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.- Since:
- 2.4
- Author:
- Vincent Siveton
-
-
Constructor Summary
Constructors Constructor Description PluginHelpGenerator()
Default constructor
-
Method Summary
All 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.org.codehaus.plexus.velocity.VelocityComponent
getVelocityComponent()
PluginHelpGenerator
setHelpPackageName(java.lang.String helpPackageName)
PluginHelpGenerator
setVelocityComponent(org.codehaus.plexus.velocity.VelocityComponent velocityComponent)
-
-
-
Method Detail
-
execute
public void execute(java.io.File destinationDirectory, org.apache.maven.tools.plugin.PluginToolsRequest request) throws GeneratorException
Execute the generation for a given plugin descriptor.- Specified by:
execute
in interfaceGenerator
- Parameters:
destinationDirectory
- requiredrequest
- required- Throws:
GeneratorException
- if any
-
setHelpPackageName
public PluginHelpGenerator setHelpPackageName(java.lang.String helpPackageName)
-
getVelocityComponent
public org.codehaus.plexus.velocity.VelocityComponent getVelocityComponent()
-
setVelocityComponent
public PluginHelpGenerator setVelocityComponent(org.codehaus.plexus.velocity.VelocityComponent velocityComponent)
-
-