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
FieldsModifier and TypeFieldDescriptionprotected File
The directory where the generatedplugin.xml
file will be put.private boolean
A flag to disable generation of theplugin.xml
in 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
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
outputDirectory
@Parameter(defaultValue="${project.build.outputDirectory}/META-INF/maven") protected File outputDirectoryThe directory where the generatedplugin.xml
file will be put. -
skipDescriptor
@Parameter(defaultValue="false") private boolean skipDescriptorA flag to disable generation of theplugin.xml
in favor of a hand authored plugin descriptor.- Since:
- 2.6
-
-
Constructor Details
-
DescriptorGeneratorMojo
public DescriptorGeneratorMojo()
-
-
Method Details
-
getOutputDirectory
- Specified by:
getOutputDirectory
in classAbstractGeneratorMojo
- Returns:
- the output directory where files will be generated.
-
createGenerator
protected org.apache.maven.tools.plugin.generator.Generator createGenerator()- Specified by:
createGenerator
in classAbstractGeneratorMojo
- Returns:
- the wanted
Generator
implementation.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractGeneratorMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-