Class HelpGeneratorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.plugin.AbstractGeneratorMojo
org.apache.maven.plugin.plugin.HelpGeneratorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="helpmojo",
defaultPhase=GENERATE_SOURCES,
threadSafe=true,
requiresDependencyResolution=COMPILE)
public class HelpGeneratorMojo
extends AbstractGeneratorMojo
Generates a
HelpMojo class.
Relies at runtime on one output file from DescriptorGeneratorMojo.- Since:
- 2.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe name of the package for the generatedHelpMojo.protected FileThe directory where the generatedHelpMojofile will be put.private final org.codehaus.plexus.velocity.VelocityComponentVelocity component.Fields inherited from class AbstractGeneratorMojo
goalPrefix, LS, projectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionHelpGeneratorMojo(org.apache.maven.project.MavenProject project, org.codehaus.plexus.velocity.VelocityComponent velocity) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerate()(package private) Stringprivate StringprefixSpecialCase(String name) Methods inherited from class AbstractGeneratorMojo
execute, getDefaultGoalPrefixMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
outputDirectory
@Parameter(defaultValue="${project.build.directory}/generated-sources/plugin") protected File outputDirectoryThe directory where the generatedHelpMojofile will be put. -
helpPackageName
The name of the package for the generatedHelpMojo.By default, the package name will be calculated as
groupId + "." + artifactIdwith additional-(dashes) will be replaced by_(underscores)_(underscore) will be added before each number or Java keyword at the beginning of name
- Since:
- 2.6
-
velocity
private final org.codehaus.plexus.velocity.VelocityComponent velocityVelocity component.
-
-
Constructor Details
-
HelpGeneratorMojo
@Inject public HelpGeneratorMojo(org.apache.maven.project.MavenProject project, org.codehaus.plexus.velocity.VelocityComponent velocity)
-
-
Method Details
-
getHelpPackageName
String getHelpPackageName() -
prefixSpecialCase
-
generate
protected void generate() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
generatein classAbstractGeneratorMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-