Package org.apache.maven.plugins.release
Class AbstractScmReleaseMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.release.AbstractReleaseMojo
-
- org.apache.maven.plugins.release.AbstractScmReleaseMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BranchReleaseMojo
,PrepareReleaseMojo
,RollbackReleaseMojo
public abstract class AbstractScmReleaseMojo extends AbstractReleaseMojo
Abstract Mojo containing SCM parameters
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
password
The SCM password to use.private java.util.Map<java.lang.String,java.lang.String>
providerImplementations
Add a new or overwrite the default implementation per provider.private boolean
pushChanges
Implemented with git will or not push changes to the upstream repository.private java.lang.String
scmCommentPrefix
The message prefix to use for all SCM changes.private org.apache.maven.scm.manager.ScmManager
scmManager
The SCM manager.private java.lang.String
tag
The SCM tag to use.private java.lang.String
tagBase
The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).private java.lang.String
tagNameFormat
Format to use when generating the tag name if none is specified.private java.lang.String
username
The SCM username to use.private java.lang.String
workItem
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.-
Fields inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
project, releaseManager, session
-
-
Constructor Summary
Constructors Constructor Description AbstractScmReleaseMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.maven.model.Scm
buildScm(org.apache.maven.project.MavenProject project)
protected ReleaseDescriptorBuilder
createReleaseDescriptor()
Creates the release descriptor from the various goal parameters.void
execute()
-
Methods inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
addArgument, getAdditionalProfiles, getBasedir, getCommonBasedir, getReactorProjects, getReleaseEnvironment, getSettings, setBasedir, setPomFileName, setReleaseManager
-
-
-
-
Field Detail
-
username
@Parameter(property="username") private java.lang.String username
The SCM username to use.
-
password
@Parameter(property="password") private java.lang.String password
The SCM password to use.
-
tag
@Parameter(alias="releaseLabel", property="tag") private java.lang.String tag
The SCM tag to use.
-
tagNameFormat
@Parameter(defaultValue="@{project.artifactId}-@{project.version}", property="tagNameFormat") private java.lang.String tagNameFormat
Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use@{...}
to reference the properties rather than${...}
. The following properties are available:groupId
orproject.groupId
- The groupId of the root project.artifactId
orproject.artifactId
- The artifactId of the root project.version
orproject.version
- The release version of the root project.
- Since:
- 2.2.0
-
tagBase
@Parameter(property="tagBase") private java.lang.String tagBase
The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches). For example,http://svn.apache.org/repos/asf/maven/plugins/tags
. The URL is an SVN URL and does not include the SCM provider and protocol.
-
scmCommentPrefix
@Parameter(defaultValue="[maven-release-plugin] ", property="scmCommentPrefix") private java.lang.String scmCommentPrefix
The message prefix to use for all SCM changes.- Since:
- 2.0-beta-5
-
pushChanges
@Parameter(defaultValue="true", property="pushChanges") private boolean pushChanges
Implemented with git will or not push changes to the upstream repository.true
by default to preserve backward compatibility.- Since:
- 2.1
-
workItem
@Parameter(property="workItem") private java.lang.String workItem
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.- Since:
- 3.0.0
-
providerImplementations
@Parameter private java.util.Map<java.lang.String,java.lang.String> providerImplementations
Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of theScmProvider
.- Since:
- 2.0-beta-6
- See Also:
ScmManager.setScmProviderImplementation(String, String)
-
scmManager
@Component private org.apache.maven.scm.manager.ScmManager scmManager
The SCM manager.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createReleaseDescriptor
protected ReleaseDescriptorBuilder createReleaseDescriptor()
Description copied from class:AbstractReleaseMojo
Creates the release descriptor from the various goal parameters.- Overrides:
createReleaseDescriptor
in classAbstractReleaseMojo
- Returns:
- The release descriptor, never
null
.
-
buildScm
protected org.apache.maven.model.Scm buildScm(org.apache.maven.project.MavenProject project)
-
-