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 booleanWhether to add a schema to the POM if it was previously missing on release.private booleanWhether to automatically assign submodules the parent version.private StringThe branch base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).private StringThe branch name to use.private StringCommand-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 StringSpecify the new version for the working copy.private booleanDry run: don't checkin or tag anything in the scm repository, or modify the checkout.private StringThe role-hint for theNamingPolicyimplementation used to calculate the project names.private StringThe role-hint for theVersionPolicyimplementation used to calculate the project versions.private StringSpecify the new version for the branch.private booleancurrently only implemented with svn scm.private StringThe SCM commit comment when branching.private booleanWhether to suppress a commit of changes to the working copy before the tag is created.private booleanWhether to update versions in the branch.private booleanWhether to update dependencies version to the next development version.private booleanWhether to update versions to SNAPSHOT in the branch.private booleanWhether to update versions in the working copy.private booleanWhether to use "edit" mode on the SCM, to lock the file for editing during SCM operations.Fields inherited from class AbstractReleaseMojo
project, releaseManager, sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractScmReleaseMojo
buildScm, createReleaseDescriptorMethods inherited from class AbstractReleaseMojo
addArgument, getAdditionalProfiles, getBasedir, getCommonBasedir, getReactorProjects, getReleaseEnvironment, getSettings, setBasedir, setPomFileName, setReleaseManagerMethods 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 requiresremoteTaggingto be set to false.
suppressCommitBeforeBranchis 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:prepareis 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 theVersionPolicyimplementation used to calculate the project versions.- Since:
- 3.0.0
- See Also:
-
projectBranchNamingPolicyId
The role-hint for theNamingPolicyimplementation 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:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractScmReleaseMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-