Class AbstractScmMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.build.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The password that is used when connecting to the SCM system.
    protected org.apache.maven.project.MavenProject
     
    protected String
    Setting this value allows the build to continue even in the event of an SCM failure.
    protected String
     
    protected String
     
    protected File
    Issue SCM actions at this local directory
    protected org.apache.maven.scm.manager.ScmManager
     
    protected String
     
    protected org.apache.maven.settings.Settings
    Maven Settings
    protected int
    Max length of a revision id (GIT only)
    protected boolean
    Whether to skip this execution.
    protected String
    The username that is used when connecting to the SCM system.

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

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    checkResult(org.apache.maven.scm.ScmResult result)
     
    protected org.apache.maven.scm.repository.ScmRepository
     
    protected String
     
    protected org.apache.maven.scm.command.info.InfoScmResult
    info(org.apache.maven.scm.repository.ScmRepository repository, org.apache.maven.scm.ScmFileSet fileSet)
    Get info from scm.

    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

    Methods inherited from interface org.apache.maven.plugin.Mojo

    execute
  • Field Details

    • 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 Details

    • AbstractScmMojo

      public AbstractScmMojo()
  • Method Details

    • 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