Package org.apache.maven.plugins.release
Class BranchReleaseMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.release.AbstractReleaseMojo
-
- org.apache.maven.plugins.release.AbstractScmReleaseMojo
-
- org.apache.maven.plugins.release.BranchReleaseMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="branch", aggregator=true) public class BranchReleaseMojo extends AbstractScmReleaseMojo
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/examples/branch.html.- Since:
- 2.0-beta-6
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
addSchema
Whether to add a schema to the POM if it was previously missing on release.private boolean
autoVersionSubmodules
Whether to automatically assign submodules the parent version.private java.lang.String
branchBase
The branch base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).private java.lang.String
branchName
The branch name to use.private java.lang.String
checkModificationExcludeList
Command-line version of checkModificationExcludes.private java.lang.String[]
checkModificationExcludes
A list of additional exclude filters that will be skipped when checking for modifications on the working copy.private java.lang.String
developmentVersion
Specify the new version for the working copy.private boolean
dryRun
Dry run: don't checkin or tag anything in the scm repository, or modify the checkout.private java.lang.String
projectBranchNamingPolicyId
The role-hint for theNamingPolicy
implementation used to calculate the project names.private java.lang.String
projectVersionPolicyId
The role-hint for theVersionPolicy
implementation used to calculate the project versions.private java.lang.String
releaseVersion
Specify the new version for the branch.private boolean
remoteTagging
currently only implemented with svn scm.private java.lang.String
scmBranchCommitComment
The SCM commit comment when branching.private boolean
suppressCommitBeforeBranch
Whether to suppress a commit of changes to the working copy before the tag is created.private boolean
updateBranchVersions
Whether to update versions in the branch.private boolean
updateDependencies
Whether to update dependencies version to the next development version.private boolean
updateVersionsToSnapshot
Whether to update versions to SNAPSHOT in the branch.private boolean
updateWorkingCopyVersions
Whether to update versions in the working copy.private boolean
useEditMode
Whether to use "edit" mode on the SCM, to lock the file for editing during SCM operations.-
Fields inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
project, releaseManager, session
-
-
Constructor Summary
Constructors Constructor Description BranchReleaseMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
-
Methods inherited from class org.apache.maven.plugins.release.AbstractScmReleaseMojo
buildScm, createReleaseDescriptor
-
Methods inherited from class org.apache.maven.plugins.release.AbstractReleaseMojo
addArgument, getAdditionalProfiles, getBasedir, getCommonBasedir, getReactorProjects, getReleaseEnvironment, getSettings, setBasedir, setPomFileName, setReleaseManager
-
-
-
-
Field Detail
-
branchName
@Parameter(property="branchName") private java.lang.String branchName
The branch name to use.- Since:
- 2.0-beta-6
-
branchBase
@Parameter(property="branchBase") private java.lang.String 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.- Since:
- 2.0
-
updateBranchVersions
@Parameter(defaultValue="false", property="updateBranchVersions") private boolean updateBranchVersions
Whether to update versions in the branch.- Since:
- 2.0-beta-6
-
updateWorkingCopyVersions
@Parameter(defaultValue="true", property="updateWorkingCopyVersions") private boolean updateWorkingCopyVersions
Whether to update versions in the working copy.- Since:
- 2.0-beta-6
-
suppressCommitBeforeBranch
@Parameter(defaultValue="false", property="suppressCommitBeforeBranch") private boolean suppressCommitBeforeBranch
Whether to suppress a commit of changes to the working copy before the tag is created.
This requiresremoteTagging
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.- Since:
- 2.1
-
updateVersionsToSnapshot
@Parameter(defaultValue="true", property="updateVersionsToSnapshot") private boolean updateVersionsToSnapshot
Whether to update versions to SNAPSHOT in the branch.- Since:
- 2.0-beta-6
-
useEditMode
@Parameter(defaultValue="false", property="useEditMode") private boolean useEditMode
Whether to use "edit" mode on the SCM, to lock the file for editing during SCM operations.- Since:
- 2.0-beta-6
-
updateDependencies
@Parameter(defaultValue="true", property="updateDependencies") private boolean updateDependencies
Whether to update dependencies version to the next development version.- Since:
- 2.0-beta-6
-
autoVersionSubmodules
@Parameter(defaultValue="false", property="autoVersionSubmodules") private boolean autoVersionSubmodules
Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.- Since:
- 2.0-beta-6
-
dryRun
@Parameter(defaultValue="false", property="dryRun") private boolean dryRun
Dry run: don't checkin or tag anything in the scm repository, or modify the checkout. Runningmvn -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.- Since:
- 2.0-beta-6
-
addSchema
@Parameter(defaultValue="true", property="addSchema") private boolean addSchema
Whether to add a schema to the POM if it was previously missing on release.- Since:
- 2.0-beta-6
-
remoteTagging
@Parameter(defaultValue="true", property="remoteTagging") private boolean 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)- Since:
- 2.0
-
checkModificationExcludes
@Parameter private java.lang.String[] 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.- Since:
- 2.1
-
checkModificationExcludeList
@Parameter(property="checkModificationExcludeList") private java.lang.String checkModificationExcludeList
Command-line version of checkModificationExcludes.- Since:
- 2.1
-
releaseVersion
@Parameter(property="releaseVersion") private java.lang.String releaseVersion
Specify the new version for the branch. This parameter is only meaningful ifupdateBranchVersions
=true
.- Since:
- 2.0
-
developmentVersion
@Parameter(property="developmentVersion") private java.lang.String developmentVersion
Specify the new version for the working copy. This parameter is only meaningful ifupdateWorkingCopyVersions
=true
.- Since:
- 2.0
-
projectVersionPolicyId
@Parameter(defaultValue="default", property="projectVersionPolicyId") private java.lang.String projectVersionPolicyId
The role-hint for theVersionPolicy
implementation used to calculate the project versions.- Since:
- 3.0.0
- See Also:
DefaultVersionPolicy
-
projectBranchNamingPolicyId
@Parameter(property="projectNamingPolicyId") private java.lang.String projectBranchNamingPolicyId
The role-hint for theNamingPolicy
implementation used to calculate the project names.- Since:
- 3.0.0
- See Also:
DefaultNamingPolicy
-
scmBranchCommitComment
@Parameter(defaultValue="@{prefix} prepare branch @{releaseLabel}", property="scmBranchCommitComment") private java.lang.String scmBranchCommitComment
The SCM commit comment when branching. Defaults to "@{prefix} prepare branch @{releaseLabel}".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.releaseLabel
- The release version of the root project.
- Since:
- 3.0.0-M1
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractScmReleaseMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
-