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 AbstractScmReleaseMojoBranch 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 booleanaddSchemaWhether to add a schema to the POM if it was previously missing on release.private booleanautoVersionSubmodulesWhether to automatically assign submodules the parent version.private java.lang.StringbranchBaseThe branch base directory in SVN, you must define it if you don't use the standard svn layout (trunk/tags/branches).private java.lang.StringbranchNameThe branch name to use.private java.lang.StringcheckModificationExcludeListCommand-line version of checkModificationExcludes.private java.lang.String[]checkModificationExcludesA list of additional exclude filters that will be skipped when checking for modifications on the working copy.private java.lang.StringdevelopmentVersionSpecify the new version for the working copy.private booleandryRunDry run: don't checkin or tag anything in the scm repository, or modify the checkout.private java.lang.StringprojectBranchNamingPolicyIdThe role-hint for theNamingPolicyimplementation used to calculate the project names.private java.lang.StringprojectVersionPolicyIdThe role-hint for theVersionPolicyimplementation used to calculate the project versions.private java.lang.StringreleaseVersionSpecify the new version for the branch.private booleanremoteTaggingcurrently only implemented with svn scm.private java.lang.StringscmBranchCommitCommentThe SCM commit comment when branching.private booleansuppressCommitBeforeBranchWhether to suppress a commit of changes to the working copy before the tag is created.private booleanupdateBranchVersionsWhether to update versions in the branch.private booleanupdateDependenciesWhether to update dependencies version to the next development version.private booleanupdateVersionsToSnapshotWhether to update versions to SNAPSHOT in the branch.private booleanupdateWorkingCopyVersionsWhether to update versions in the working copy.private booleanuseEditModeWhether 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 voidexecute()-
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 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
@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 projectVersionPolicyIdThe role-hint for theVersionPolicyimplementation 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 theNamingPolicyimplementation 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 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
-
-
Method Detail
-
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
-
-