release:branch
Full name:
org.apache.maven.plugins:maven-release-plugin:3.1.1:branch
Description:
Branch a project in SCM, using the same steps as the release:prepare
goal, creating a branch instead of a tag. For more info see https://maven.apache.org/plugins/maven-release-plugin/usage/branch.html.
Attributes:
- Requires a Maven project to be executed.
- Executes as an aggregator goal.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Since version:
2.0-beta-6
.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<addSchema> |
boolean |
2.0-beta-6 |
Whether to add a schema to the POM if it was previously missing on release. Default: true User Property: addSchema |
<arguments> |
String |
- |
Additional arguments to pass to the Maven executions, separated by spaces. User Property: arguments Alias: prepareVerifyArgs |
<autoVersionSubmodules> |
boolean |
2.0-beta-6 |
Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules. Default: false User Property: autoVersionSubmodules |
<branchBase> |
String |
2.0 |
The branch 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/branches . The URL is an SVN URL and does not include the SCM provider and protocol.User Property: branchBase |
<branchName> |
String |
2.0-beta-6 |
The branch name to use. User Property: branchName |
<checkModificationExcludeList> |
String |
2.1 |
Command-line version of checkModificationExcludes. User Property: checkModificationExcludeList |
<checkModificationExcludes> |
String[] |
2.1 |
A list of additional exclude filters that will be skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set. |
<developmentVersion> |
String |
2.0 |
Specify the new version for the working copy. This parameter is only meaningful if updateWorkingCopyVersions = true .User Property: developmentVersion |
<dryRun> |
boolean |
2.0-beta-6 |
Dry run: don't checkin or tag anything in the scm repository, or modify the checkout. Running mvn -DdryRun=true release:prepare is useful in order to check that modifications to poms and scm operations (only listed on the console) are working as expected. Modified POMs are written alongside the originals without modifying them.Default: false User Property: dryRun |
<javaHome> |
File |
2.0-beta-8 |
The Java home parameter to use for forked Maven invocations. Default: ${java.home} |
<localRepoDirectory> |
File |
2.0-beta-8 |
The command-line local repository directory in use for this build (if specified). Default: ${maven.repo.local} |
<mavenExecutorId> |
String |
2.0-beta-8 |
Role hint of the org.apache.maven.shared.release.exec.MavenExecutor implementation to use.Default: invoker User Property: mavenExecutorId |
<mavenHome> |
File |
2.0-beta-8 |
The Maven home parameter to use for forked Maven invocations. Default: ${maven.home} |
<password> |
String |
- |
The SCM password to use. User Property: password |
<pinExternals> |
boolean |
3.0.0-M5 |
Currently only implemented with svn scm. Enable the --pin-externals option in svn copy command which is new in Subversion 1.9.Default: false User Property: pinExternals |
<pomFileName> |
String |
- |
The file name of the POM to execute any goals against. As of version 3.0.0, this defaults to the name of POM file of the project being built. Default: ${project.file.name} User Property: pomFileName |
<projectBranchNamingPolicyId> |
String |
3.0.0-M5 |
The role-hint for the org.apache.maven.shared.release.policy.naming.NamingPolicy implementation used to calculate the project names.See also: org.apache.maven.shared.release.policies.DefaultNamingPolicy User Property: projectNamingPolicyId |
<projectVersionPolicyConfig> |
PlexusConfiguration |
3.0.0 |
Optional config for the VersionPolicy implementation used to calculate the project versions. User Property: projectVersionPolicyConfig |
<projectVersionPolicyId> |
String |
3.0.0-M5 |
The role-hint for the org.apache.maven.shared.release.policy.version.VersionPolicy implementation used to calculate the project versions.See also: org.apache.maven.shared.release.policies.DefaultVersionPolicy Default: default User Property: projectVersionPolicyId |
<providerImplementations> |
Map<String,String> |
2.0-beta-6 |
Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the org.apache.maven.scm.provider.ScmProvider .See also: org.apache.maven.scm.manager.ScmManager.setScmProviderImplementation(java.lang.String,java.lang.String) |
<pushChanges> |
boolean |
2.1 |
Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.Default: true User Property: pushChanges |
<releaseStrategyId> |
String |
3.0.0-M5 |
The role-hint for the org.apache.maven.shared.release.strategy.Strategy implementation used to specify the phases per goal.See also: org.apache.maven.shared.release.strategies.DefaultStrategy Default: default User Property: releaseStrategyId |
<releaseVersion> |
String |
2.0 |
Specify the new version for the branch. This parameter is only meaningful if updateBranchVersions = true .User Property: releaseVersion |
<remoteTagging> |
boolean |
2.0 |
currently only implemented with svn scm. Enable a workaround to prevent issue due to svn client > 1.5.0 (https://issues.apache.org/jira/browse/SCM-406) Default: true User Property: remoteTagging |
<scmBranchCommitComment> |
String |
3.0.0-M1 |
The SCM commit comment when branching. Defaults to "@{prefix} prepare branch @{branchName}".
Property interpolation is performed on the value, but in order to ensure that the interpolation occurs during release, you must use
Default: @{prefix} prepare branch @{branchName} User Property: scmBranchCommitComment |
<scmCommentPrefix> |
String |
2.0-beta-5 |
The message prefix to use for all SCM changes. Default: [maven-release-plugin] User Property: scmCommentPrefix |
<scmShallowClone> |
boolean |
- |
When cloning a repository if it should be a shallow clone or a full clone. Default: true User Property: scmShallowClone |
<suppressCommitBeforeBranch> |
boolean |
2.1 |
Whether to suppress a commit of changes to the working copy before the tag is created.
This requires remoteTagging to be set to false.
suppressCommitBeforeBranch is useful when you want to avoid poms with released versions in all revisions of your trunk or development branch.Default: false User Property: suppressCommitBeforeBranch |
<tag> |
String |
- |
The SCM tag to use. User Property: tag Alias: releaseLabel |
<tagBase> |
String |
- |
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.User Property: tagBase |
<tagNameFormat> |
String |
2.2.0 |
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:
Default: @{project.artifactId}-@{project.version} User Property: tagNameFormat |
<updateBranchVersions> |
boolean |
2.0-beta-6 |
Whether to update versions in the branch. Default: false User Property: updateBranchVersions |
<updateDependencies> |
boolean |
2.0-beta-6 |
Whether to update dependencies version to the next development version. Default: true User Property: updateDependencies |
<updateVersionsToSnapshot> |
boolean |
2.0-beta-6 |
Whether to update versions to SNAPSHOT in the branch. Default: true User Property: updateVersionsToSnapshot |
<updateWorkingCopyVersions> |
boolean |
2.0-beta-6 |
Whether to update versions in the working copy. Default: true User Property: updateWorkingCopyVersions |
<useEditMode> |
boolean |
2.0-beta-6 |
Whether to use "edit" mode on the SCM, to lock the file for editing during SCM operations. Default: false User Property: useEditMode |
<username> |
String |
- |
The SCM username to use. User Property: username |
<workItem> |
String |
3.0.0-M5 |
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation. User Property: workItem |
Parameter Details
<addSchema>
Whether to add a schema to the POM if it was previously missing on release.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
addSchema
- Default:
true
<arguments>
Additional arguments to pass to the Maven executions, separated by spaces.
- Type:
java.lang.String
- Required:
No
- User Property:
arguments
- Alias:
prepareVerifyArgs
<autoVersionSubmodules>
Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
autoVersionSubmodules
- Default:
false
<branchBase>
The branch 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/branches
. The URL is an SVN URL and does not include the SCM provider and protocol.- Type:
java.lang.String
- Since:
2.0
- Required:
No
- User Property:
branchBase
<branchName>
The branch name to use.
- Type:
java.lang.String
- Since:
2.0-beta-6
- Required:
No
- User Property:
branchName
<checkModificationExcludeList>
Command-line version of checkModificationExcludes.
- Type:
java.lang.String
- Since:
2.1
- Required:
No
- User Property:
checkModificationExcludeList
<checkModificationExcludes>
A list of additional exclude filters that will be skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set.
- Type:
java.lang.String[]
- Since:
2.1
- Required:
No
<developmentVersion>
Specify the new version for the working copy. This parameter is only meaningful if
updateWorkingCopyVersions
= true
.- Type:
java.lang.String
- Since:
2.0
- Required:
No
- User Property:
developmentVersion
<dryRun>
Dry run: don't checkin or tag anything in the scm repository, or modify the checkout. Running
mvn -DdryRun=true release:prepare
is useful in order to check that modifications to poms and scm operations (only listed on the console) are working as expected. Modified POMs are written alongside the originals without modifying them.- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
dryRun
- Default:
false
<javaHome>
The Java home parameter to use for forked Maven invocations.
- Type:
java.io.File
- Since:
2.0-beta-8
- Required:
No
- Default:
${java.home}
<localRepoDirectory>
The command-line local repository directory in use for this build (if specified).
- Type:
java.io.File
- Since:
2.0-beta-8
- Required:
No
- Default:
${maven.repo.local}
<mavenExecutorId>
Role hint of the
org.apache.maven.shared.release.exec.MavenExecutor
implementation to use.- Type:
java.lang.String
- Since:
2.0-beta-8
- Required:
No
- User Property:
mavenExecutorId
- Default:
invoker
<mavenHome>
The Maven home parameter to use for forked Maven invocations.
- Type:
java.io.File
- Since:
2.0-beta-8
- Required:
No
- Default:
${maven.home}
<password>
The SCM password to use.
- Type:
java.lang.String
- Required:
No
- User Property:
password
<pinExternals>
Currently only implemented with svn scm. Enable the
--pin-externals
option in svn copy
command which is new in Subversion 1.9.- Type:
boolean
- Since:
3.0.0-M5
- Required:
No
- User Property:
pinExternals
- Default:
false
<pomFileName>
The file name of the POM to execute any goals against. As of version 3.0.0, this defaults to the name of POM file of the project being built.
- Type:
java.lang.String
- Required:
No
- User Property:
pomFileName
- Default:
${project.file.name}
<projectBranchNamingPolicyId>
The role-hint for the
See also: org.apache.maven.shared.release.policies.DefaultNamingPolicy
org.apache.maven.shared.release.policy.naming.NamingPolicy
implementation used to calculate the project names.See also: org.apache.maven.shared.release.policies.DefaultNamingPolicy
- Type:
java.lang.String
- Since:
3.0.0-M5
- Required:
No
- User Property:
projectNamingPolicyId
<projectVersionPolicyConfig>
Optional config for the VersionPolicy implementation used to calculate the project versions.
- Type:
org.codehaus.plexus.configuration.PlexusConfiguration
- Since:
3.0.0
- Required:
No
- User Property:
projectVersionPolicyConfig
<projectVersionPolicyId>
The role-hint for the
See also: org.apache.maven.shared.release.policies.DefaultVersionPolicy
org.apache.maven.shared.release.policy.version.VersionPolicy
implementation used to calculate the project versions.See also: org.apache.maven.shared.release.policies.DefaultVersionPolicy
- Type:
java.lang.String
- Since:
3.0.0-M5
- Required:
No
- User Property:
projectVersionPolicyId
- Default:
default
<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 the
See also: org.apache.maven.scm.manager.ScmManager.setScmProviderImplementation(java.lang.String,java.lang.String)
org.apache.maven.scm.provider.ScmProvider
.See also: org.apache.maven.scm.manager.ScmManager.setScmProviderImplementation(java.lang.String,java.lang.String)
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Since:
2.0-beta-6
- Required:
No
<pushChanges>
Implemented with git will or not push changes to the upstream repository.
true
by default to preserve backward compatibility.- Type:
boolean
- Since:
2.1
- Required:
No
- User Property:
pushChanges
- Default:
true
<releaseStrategyId>
The role-hint for the
See also: org.apache.maven.shared.release.strategies.DefaultStrategy
org.apache.maven.shared.release.strategy.Strategy
implementation used to specify the phases per goal.See also: org.apache.maven.shared.release.strategies.DefaultStrategy
- Type:
java.lang.String
- Since:
3.0.0-M5
- Required:
No
- User Property:
releaseStrategyId
- Default:
default
<releaseVersion>
Specify the new version for the branch. This parameter is only meaningful if
updateBranchVersions
= true
.- Type:
java.lang.String
- Since:
2.0
- Required:
No
- User Property:
releaseVersion
<remoteTagging>
currently only implemented with svn scm. Enable a workaround to prevent issue due to svn client > 1.5.0 (https://issues.apache.org/jira/browse/SCM-406)
- Type:
boolean
- Since:
2.0
- Required:
No
- User Property:
remoteTagging
- Default:
true
<scmBranchCommitComment>
The SCM commit comment when branching. Defaults to "@{prefix} prepare branch @{branchName}".
Property interpolation is performed on the value, 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:
prefix
- The comment prefix.groupId
- The groupId of the root project.artifactId
- The artifactId of the root project.branchName
- The branch name of the root project.
- Type:
java.lang.String
- Since:
3.0.0-M1
- Required:
No
- User Property:
scmBranchCommitComment
- Default:
@{prefix} prepare branch @{branchName}
<scmCommentPrefix>
The message prefix to use for all SCM changes.
- Type:
java.lang.String
- Since:
2.0-beta-5
- Required:
No
- User Property:
scmCommentPrefix
- Default:
[maven-release-plugin]
<scmShallowClone>
When cloning a repository if it should be a shallow clone or a full clone.
- Type:
boolean
- Required:
No
- User Property:
scmShallowClone
- Default:
true
<suppressCommitBeforeBranch>
Whether to suppress a commit of changes to the working copy before the tag is created.
This requires
This requires
remoteTagging
to be set to false.
suppressCommitBeforeBranch
is useful when you want to avoid poms with released versions in all revisions of your trunk or development branch.- Type:
boolean
- Since:
2.1
- Required:
No
- User Property:
suppressCommitBeforeBranch
- Default:
false
<tag>
The SCM tag to use.
- Type:
java.lang.String
- Required:
No
- User Property:
tag
- Alias:
releaseLabel
<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.- Type:
java.lang.String
- Required:
No
- User Property:
tagBase
<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.
- Type:
java.lang.String
- Since:
2.2.0
- Required:
No
- User Property:
tagNameFormat
- Default:
@{project.artifactId}-@{project.version}
<updateBranchVersions>
Whether to update versions in the branch.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
updateBranchVersions
- Default:
false
<updateDependencies>
Whether to update dependencies version to the next development version.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
updateDependencies
- Default:
true
<updateVersionsToSnapshot>
Whether to update versions to SNAPSHOT in the branch.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
updateVersionsToSnapshot
- Default:
true
<updateWorkingCopyVersions>
Whether to update versions in the working copy.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
updateWorkingCopyVersions
- Default:
true
<useEditMode>
Whether to use "edit" mode on the SCM, to lock the file for editing during SCM operations.
- Type:
boolean
- Since:
2.0-beta-6
- Required:
No
- User Property:
useEditMode
- Default:
false
<username>
The SCM username to use.
- Type:
java.lang.String
- Required:
No
- User Property:
username
<workItem>
A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.
- Type:
java.lang.String
- Since:
3.0.0-M5
- Required:
No
- User Property:
workItem