Class VersionMojo

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

    @Mojo(name="version",
          defaultPhase=INITIALIZE,
          threadSafe=true)
    public class VersionMojo
    extends org.apache.maven.plugin.AbstractMojo
    Makes the rpm version and release attributes available as properties.
    Since:
    2.0
    Author:
    Brett Okken
    • Constructor Detail

      • VersionMojo

        public VersionMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Specified by:
        execute in interface org.apache.maven.plugin.Mojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • getVersion

        public final String getVersion()
        Returns:
        Returns the configured version attribute.
      • getRelease

        public final String getRelease()
        Returns:
        Returns the configured release attribute.
      • getBuildTimestamp

        public Date getBuildTimestamp()