Class TagMojo

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

    @Mojo(name="tag",
          defaultPhase=INITIALIZE,
          threadSafe=true)
    public class TagMojo
    extends AbstractGitMojo
    This goal provides the most recent Git tag in the "mavanagaiata.tag" and "mvngit.tag" properties.
    Since:
    0.1.0
    Author:
    Sebastian Staudt
    • Constructor Detail

      • TagMojo

        public TagMojo()
    • Method Detail

      • run

        public void run​(GitRepository repository)
                 throws MavanagaiataMojoException
        This will first read all tags and walk the commit hierarchy down from HEAD until it finds one of the tags. The name of that tag is written into "mavanagaiata.tag" and "mvngit.tag" respectively.
        Specified by:
        run in class AbstractGitMojo
        Parameters:
        repository - The repository instance to use
        Throws:
        MavanagaiataMojoException - if the tags cannot be read