Class 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
    Author:
    Jason van Zyl
    • Field Detail

      • outputDirectory

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

      • DescriptorGeneratorMojo

        public DescriptorGeneratorMojo()
    • Method Detail

      • createGenerator

        protected org.apache.maven.tools.plugin.generator.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