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
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
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether to add a schema to the POM if it was previously missing on release.private boolean
Whether to automatically assign submodules the parent version.private String
The branch base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).private String
The branch name to use.private String
Command-line version of checkModificationExcludes.private String[]
A list of additional exclude filters that will be skipped when checking for modifications on the working copy.private String
Specify the new version for the working copy.private boolean
Dry run: don't checkin or tag anything in the scm repository, or modify the checkout.private String
The role-hint for theNamingPolicy
implementation used to calculate the project names.private String
The role-hint for theVersionPolicy
implementation used to calculate the project versions.private String
Specify the new version for the branch.private boolean
currently only implemented with svn scm.private String
The SCM commit comment when branching.private boolean
Whether to suppress a commit of changes to the working copy before the tag is created.private boolean
Whether to update versions in the branch.private boolean
Whether to update dependencies version to the next development version.private boolean
Whether to update versions to SNAPSHOT in the branch.private boolean
Whether to update versions in the working copy.private boolean
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
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
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
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
branchName
The branch name to use.- Since:
- 2.0-beta-6
-
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 updateBranchVersionsWhether to update versions in the branch.- Since:
- 2.0-beta-6
-
updateWorkingCopyVersions
@Parameter(defaultValue="true", property="updateWorkingCopyVersions") private boolean updateWorkingCopyVersionsWhether to update versions in the working copy.- Since:
- 2.0-beta-6
-
suppressCommitBeforeBranch
@Parameter(defaultValue="false", property="suppressCommitBeforeBranch") private boolean suppressCommitBeforeBranchWhether 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 updateVersionsToSnapshotWhether to update versions to SNAPSHOT in the branch.- Since:
- 2.0-beta-6
-
useEditMode
@Parameter(defaultValue="false", property="useEditMode") private boolean useEditModeWhether 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 updateDependenciesWhether to update dependencies version to the next development version.- Since:
- 2.0-beta-6
-
autoVersionSubmodules
@Parameter(defaultValue="false", property="autoVersionSubmodules") private boolean autoVersionSubmodulesWhether 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 dryRunDry 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 addSchemaWhether 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 remoteTaggingcurrently 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
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
Command-line version of checkModificationExcludes.- Since:
- 2.1
-
releaseVersion
Specify the new version for the branch. This parameter is only meaningful ifupdateBranchVersions
=true
.- Since:
- 2.0
-
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 String projectVersionPolicyIdThe role-hint for theVersionPolicy
implementation used to calculate the project versions.- Since:
- 3.0.0
- See Also:
-
projectBranchNamingPolicyId
The role-hint for theNamingPolicy
implementation used to calculate the project names.- Since:
- 3.0.0
- See Also:
-
scmBranchCommitComment
@Parameter(defaultValue="@{prefix} prepare branch @{releaseLabel}", property="scmBranchCommitComment") private String scmBranchCommitCommentThe 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
-
-
Constructor Details
-
BranchReleaseMojo
public BranchReleaseMojo()
-
-
Method Details
-
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
-