Class InfoClassMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="info-class",
          defaultPhase=GENERATE_SOURCES,
          threadSafe=true)
    public class InfoClassMojo
    extends AbstractGitMojo
    This goal generates the source code for a Java class with Git information like commit ID and tag name.
    Since:
    0.5.0
    Author:
    Sebastian Staudt
    • Field Detail

      • className

        @Parameter(property="mavanagaiata.info-class.className",
                   defaultValue="GitInfo")
        String className
        The name of the class to generate
      • encoding

        @Parameter(property="mavanagaiata.info-class.encoding",
                   defaultValue="${project.build.sourceEncoding}")
        String encoding
        The encoding of the generated source file
      • fileFilter

        @Component
        org.apache.maven.shared.filtering.MavenFileFilter fileFilter
      • packageName

        @Parameter(property="mavanagaiata.info-class.packageName",
                   defaultValue="${project.groupId}.${project.artifactId}")
        String packageName
        The name of the package in which the class will be generated
      • outputDirectory

        @Parameter(property="mavanagaiata.info-class.outputDirectory",
                   defaultValue="${project.build.directory}/generated-sources/mavanagaiata")
        File outputDirectory
        The directory to write the source code to

        This directory is automatically added to the source roots used to compile the project.

      • templateFile

        @Parameter(property="mavanagaiata.info-class.templatePath")
        private File templateFile
        The path to an alternative template for the info class
    • Constructor Detail

      • InfoClassMojo

        public InfoClassMojo()