Class AbstractScmMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    CreateMetadataMojo, CreateMojo

    public abstract class AbstractScmMojo
    extends org.apache.maven.plugin.AbstractMojo
    • Field Detail

      • scmConnectionUrl

        @Parameter(defaultValue="${project.scm.connection}",
                   alias="readUrlScm",
                   readonly=true)
        protected String scmConnectionUrl
        Since:
        1.0-beta-5
      • scmDeveloperConnectionUrl

        @Parameter(defaultValue="${project.scm.developerConnection}",
                   alias="urlScm",
                   readonly=true)
        protected String scmDeveloperConnectionUrl
        Since:
        1.0-beta-5
      • scmTag

        @Parameter(defaultValue="${project.scm.tag}",
                   readonly=true)
        protected String scmTag
        Since:
        1.4
      • username

        @Parameter(property="username")
        protected String username
        The username that is used when connecting to the SCM system.
        Since:
        1.0-beta-1
      • password

        @Parameter(property="password")
        protected String password
        The password that is used when connecting to the SCM system.
        Since:
        1.0-beta-1
      • scmDirectory

        @Parameter(property="maven.buildNumber.scmDirectory",
                   defaultValue="${basedir}")
        protected File scmDirectory
        Issue SCM actions at this local directory
        Since:
        1.0-beta-1
      • shortRevisionLength

        @Parameter(property="maven.buildNumber.shortRevisionLength",
                   defaultValue="0")
        protected int shortRevisionLength
        Max length of a revision id (GIT only)
        Since:
        1.1
      • revisionOnScmFailure

        @Parameter(property="maven.buildNumber.revisionOnScmFailure")
        protected String revisionOnScmFailure
        Setting this value allows the build to continue even in the event of an SCM failure. The value set will be used as the revision string in the event of a failure to retrieve the revision it from the SCM.
        Since:
        1.0-beta-2
      • skip

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

        @Parameter(defaultValue="${settings}",
                   readonly=true)
        protected org.apache.maven.settings.Settings settings
        Maven Settings
        Since:
        1.4
      • project

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

        @Component
        protected org.apache.maven.scm.manager.ScmManager scmManager
    • Constructor Detail

      • AbstractScmMojo

        public AbstractScmMojo()
    • Method Detail

      • getScmRepository

        protected org.apache.maven.scm.repository.ScmRepository getScmRepository()
                                                                          throws org.apache.maven.scm.ScmException
        Throws:
        org.apache.maven.scm.ScmException
      • checkResult

        protected void checkResult​(org.apache.maven.scm.ScmResult result)
                            throws org.apache.maven.scm.ScmException
        Throws:
        org.apache.maven.scm.ScmException
      • info

        protected org.apache.maven.scm.command.info.InfoScmResult info​(org.apache.maven.scm.repository.ScmRepository repository,
                                                                       org.apache.maven.scm.ScmFileSet fileSet)
                                                                throws org.apache.maven.scm.ScmException
        Get info from scm.
        Parameters:
        repository -
        fileSet -
        Returns:
        Throws:
        org.apache.maven.scm.ScmException
      • getScmRevision

        protected String getScmRevision()
                                 throws org.apache.maven.scm.ScmException
        Throws:
        org.apache.maven.scm.ScmException