Package org.apache.maven.plugin.plugin
Class DescriptorGeneratorMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.plugin.AbstractGeneratorMojo
-
- org.apache.maven.plugin.plugin.DescriptorGeneratorMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="descriptor", defaultPhase=PROCESS_CLASSES, requiresDependencyResolution=RUNTIME, threadSafe=true) public class DescriptorGeneratorMojo extends AbstractGeneratorMojo
Generate a plugin descriptor.
Note: Since 3.0, for Java plugin annotations support, default phase defined by this goal is after the "compilation" of any scripts. This doesn't override the default binding coded at generate-resources phase in Maven core.
- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.FileoutputDirectoryThe directory where the generatedplugin.xmlfile will be put.private booleanskipDescriptorA flag to disable generation of theplugin.xmlin favor of a hand authored plugin descriptor.-
Fields inherited from class org.apache.maven.plugin.plugin.AbstractGeneratorMojo
dependencies, encoding, extractors, goalPrefix, local, mojoScanner, packagingTypes, project, remoteRepos, skip, skipErrorNoDescriptorsFound
-
-
Constructor Summary
Constructors Constructor Description DescriptorGeneratorMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GeneratorcreateGenerator()voidexecute()protected java.io.FilegetOutputDirectory()
-
-
-
Field Detail
-
outputDirectory
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/maven") protected java.io.File outputDirectory
The directory where the generatedplugin.xmlfile will be put.
-
skipDescriptor
@Parameter(defaultValue="false") private boolean skipDescriptor
A flag to disable generation of theplugin.xmlin favor of a hand authored plugin descriptor.- Since:
- 2.6
-
-
Method Detail
-
getOutputDirectory
protected java.io.File getOutputDirectory()
- Specified by:
getOutputDirectoryin classAbstractGeneratorMojo- Returns:
- the output directory where files will be generated.
-
createGenerator
protected Generator createGenerator()
- Specified by:
createGeneratorin classAbstractGeneratorMojo- Returns:
- the wanted
Generatorimplementation.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractGeneratorMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-