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

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 Details

    • outputDirectory

      @Parameter(defaultValue="${project.build.outputDirectory}/META-INF/maven", readonly=true) protected File outputDirectory
      The directory where the generated plugin.xml file will be put.
    • skipDescriptor

      @Parameter(defaultValue="false") private boolean skipDescriptor
      A flag to disable generation of the plugin.xml in favor of a hand authored plugin descriptor.
      Since:
      2.6
  • Constructor Details

    • DescriptorGeneratorMojo

      public DescriptorGeneratorMojo()
  • Method Details

    • getOutputDirectory

      protected File getOutputDirectory()
      Specified by:
      getOutputDirectory in class AbstractGeneratorMojo
      Returns:
      the output directory where files will be generated.
    • createGenerator

      protected Generator createGenerator()
      Specified by:
      createGenerator in class AbstractGeneratorMojo
      Returns:
      the wanted Generator implementation.
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Overrides:
      execute in class AbstractGeneratorMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException