Class HgChangeSetMojo

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

    @Mojo(name="hgchangeset",
          defaultPhase=INITIALIZE,
          requiresProject=true,
          threadSafe=true)
    public class HgChangeSetMojo
    extends org.apache.maven.plugin.AbstractMojo
    Goal which sets project properties for changeSet and changeSetDate from the current Mercurial repository.
    Since:
    1.0-beta-4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.scm.log.ScmLogDispatcher logger  
      private org.apache.maven.project.MavenProject project
      The maven project.
      private java.io.File scmDirectory
      Local directory to be used to issue SCM actions
      private boolean skip
      Whether to skip this execution.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      HgChangeSetMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void checkResult​(org.apache.maven.scm.ScmResult result)  
      void execute()  
      protected java.lang.String getChangeSet()  
      protected java.lang.String getChangeSetDate()  
      protected java.lang.String getChangeSetDateProperty()  
      protected java.lang.String getChangeSetProperty()  
      protected java.lang.String getProperty​(java.lang.String property)  
      private void setChangeSetDateProperty​(java.lang.String changeSetDate)  
      private void setChangeSetProperty​(java.lang.String changeSet)  
      private void setProperty​(java.lang.String property, java.lang.String value)  
      • 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
    • Field Detail

      • skip

        @Parameter(property="maven.buildNumber.skip",
                   defaultValue="false")
        private boolean skip
        Whether to skip this execution.
        Since:
        1.3
      • logger

        private org.apache.maven.scm.log.ScmLogDispatcher logger
      • project

        @Parameter(defaultValue="${project}",
                   required=true,
                   readonly=true)
        private org.apache.maven.project.MavenProject project
        The maven project.
      • scmDirectory

        @Parameter(property="maven.changeSet.scmDirectory",
                   defaultValue="${basedir}")
        private java.io.File scmDirectory
        Local directory to be used to issue SCM actions
        Since:
        1.0
    • Constructor Detail

      • HgChangeSetMojo

        public HgChangeSetMojo()
    • Method Detail

      • checkResult

        private void checkResult​(org.apache.maven.scm.ScmResult result)
                          throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • execute

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

        protected java.lang.String getChangeSet()
                                         throws org.apache.maven.scm.ScmException,
                                                org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.scm.ScmException
        org.apache.maven.plugin.MojoExecutionException
      • getChangeSetDate

        protected java.lang.String getChangeSetDate()
                                             throws org.apache.maven.scm.ScmException,
                                                    org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.scm.ScmException
        org.apache.maven.plugin.MojoExecutionException
      • getChangeSetDateProperty

        protected java.lang.String getChangeSetDateProperty()
      • getChangeSetProperty

        protected java.lang.String getChangeSetProperty()
      • getProperty

        protected java.lang.String getProperty​(java.lang.String property)
      • setChangeSetDateProperty

        private void setChangeSetDateProperty​(java.lang.String changeSetDate)
      • setChangeSetProperty

        private void setChangeSetProperty​(java.lang.String changeSet)
      • setProperty

        private void setProperty​(java.lang.String property,
                                 java.lang.String value)