Package org.codehaus.mojo.build
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 StringpasswordThe password that is used when connecting to the SCM system.protected org.apache.maven.project.MavenProjectprojectprotected StringrevisionOnScmFailureSetting this value allows the build to continue even in the event of an SCM failure.protected StringscmConnectionUrlprotected StringscmDeveloperConnectionUrlprotected FilescmDirectoryIssue SCM actions at this local directoryprotected org.apache.maven.scm.manager.ScmManagerscmManagerprotected StringscmTagprotected org.apache.maven.settings.SettingssettingsMaven Settingsprotected intshortRevisionLengthMax length of a revision id (GIT only)protected booleanskipWhether to skip this execution.protected StringusernameThe username that is used when connecting to the SCM system.
-
Constructor Summary
Constructors Constructor Description AbstractScmMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckResult(org.apache.maven.scm.ScmResult result)protected org.apache.maven.scm.repository.ScmRepositorygetScmRepository()protected StringgetScmRevision()protected org.apache.maven.scm.command.info.InfoScmResultinfo(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
-
-
-
-
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 scmDirectoryIssue SCM actions at this local directory- Since:
- 1.0-beta-1
-
shortRevisionLength
@Parameter(property="maven.buildNumber.shortRevisionLength", defaultValue="0") protected int shortRevisionLengthMax 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 skipWhether to skip this execution.- Since:
- 1.3
-
settings
@Parameter(defaultValue="${settings}", readonly=true) protected org.apache.maven.settings.Settings settingsMaven 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
-
-
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.ScmExceptionGet 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
-
-