Class GitCommitIdMojo

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

    @Mojo(name="revision",
          defaultPhase=INITIALIZE,
          threadSafe=true)
    public class GitCommitIdMojo
    extends org.apache.maven.plugin.AbstractMojo
    Puts git build-time information into property files or maven's properties.
    Since:
    1.0
    • Field Summary

      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      GitCommitIdMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      protected java.util.Map<java.lang.String,​java.lang.String> getCustomSystemEnv()
      This method is used to mock the system environment in testing.
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GitCommitIdMojo

        public GitCommitIdMojo()
    • Method Detail

      • getCustomSystemEnv

        protected java.util.Map<java.lang.String,​java.lang.String> getCustomSystemEnv()
        This method is used to mock the system environment in testing.
        Returns:
        unmodifiable string map view of the current system environment System.getenv(java.lang.String).
      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException