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
Abstract Mojo containing SCM parameters
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The SCM password to use.Add a new or overwrite the default implementation per provider.private boolean
Implemented with git will or not push changes to the upstream repository.private String
The message prefix to use for all SCM changes.private org.apache.maven.scm.manager.ScmManager
The SCM manager.private String
The SCM tag to use.private String
The tag base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).private String
Format to use when generating the tag name if none is specified.private String
The SCM username to use.private String
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
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.model.Scm
buildScm
(org.apache.maven.project.MavenProject project) protected ReleaseDescriptorBuilder
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
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
username
The SCM username to use. -
password
The SCM password to use. -
tag
The SCM tag to use. -
tagNameFormat
@Parameter(defaultValue="@{project.artifactId}-@{project.version}", property="tagNameFormat") private String tagNameFormatFormat 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
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 String scmCommentPrefixThe message prefix to use for all SCM changes.- Since:
- 2.0-beta-5
-
pushChanges
@Parameter(defaultValue="true", property="pushChanges") private boolean pushChangesImplemented with git will or not push changes to the upstream repository.true
by default to preserve backward compatibility.- Since:
- 2.1
-
workItem
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.- Since:
- 3.0.0
-
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
@Component private org.apache.maven.scm.manager.ScmManager scmManagerThe SCM manager.
-
-
Constructor Details
-
AbstractScmReleaseMojo
public AbstractScmReleaseMojo()
-
-
Method Details
-
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
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)
-