release:prepare

Full name:

org.apache.maven.plugins:maven-release-plugin:2.5:prepare

Description:

Prepare for a release in SCM. Steps through several phases to ensure the POM is ready to be released and then prepares SCM to eventually contain a tagged version of the release and a record in the local copy of the parameters used. This can be followed by a call to release:perform. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator plugin.

Optional Parameters

Name Type Since Description
addSchema boolean - Whether to add a schema to the POM if it was previously missing on release.
Default value is: true.
User property is: addSchema.
allowTimestampedSnapshots boolean 2.0-beta-7 Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.
Default value is: false.
User property is: ignoreSnapshots.
arguments String - Additional arguments to pass to the Maven executions, separated by spaces.
User property is: arguments.
autoVersionSubmodules boolean 2.0-beta-5 Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.
Default value is: false.
User property is: autoVersionSubmodules.
checkModificationExcludeList String 2.1 Command-line version of checkModificationExcludes.
User property is: 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.
commitByProject boolean 2.0-beta-5 Commits to do are atomic or by project.
Default value is: false.
User property is: commitByProject.
completionGoals String 2.2 Goals to run on completion of the preparation step, after transformation back to the next development version but before committing. Space delimited.
User property is: completionGoals.
developmentVersion String 2.0-beta-8 Default version to use for new local working copy.
User property is: developmentVersion.
dryRun boolean - 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 value is: false.
User property is: dryRun.
generateReleasePoms boolean - Deprecated. Please use release:prepare-with-pom instead.
Default value is: false.
User property is: generateReleasePoms.
javaHome File 2.0-beta-8 The JAVA_HOME parameter to use for forked Maven invocations.
Default value is: ${java.home}.
localRepoDirectory File 2.0-beta-8 The command-line local repository directory in use for this build (if specified).
Default value is: ${maven.repo.local}.
mavenExecutorId String 2.0-beta-8 Role hint of the MavenExecutor implementation to use.
Default value is: invoker.
User property is: mavenExecutorId.
mavenHome File 2.0-beta-8 The M2_HOME parameter to use for forked Maven invocations.
Default value is: ${maven.home}.
password String - The SCM password to use.
User property is: password.
pomFileName String - The file name of the POM to execute any goals against.
User property is: pomFileName.
preparationGoals String - Goals to run as part of the preparation step, after transformation but before committing. Space delimited.
Default value is: clean verify.
User property is: preparationGoals.
providerImplementations Map 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 ScmProvider.
pushChanges boolean 2.1 Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.
Default value is: true.
User property is: pushChanges.
releaseVersion String 2.0-beta-8 Default version to use when preparing a release or a branch.
User property is: releaseVersion.
remoteTagging boolean 2.0-beta-9 Currently only implemented with svn scm.
  • Enables a workaround to prevent issue due to svn client > 1.5.0 (fixed in 1.6.5) (http://jira.codehaus.org/browse/SCM-406)
  • You may not want to use this in conjunction with suppressCommitBeforeTag, such that no poms with released versions are committed to the working copy ever.

Default value is: true.
User property is: remoteTagging.
resume boolean - Resume a previous release attempt from the point where it was stopped.
Default value is: true.
User property is: resume.
scmCommentPrefix String 2.0-beta-5 The message prefix to use for all SCM changes.
Default value is: [maven-release-plugin] .
User property is: scmCommentPrefix.
suppressCommitBeforeTag 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.

suppressCommitBeforeTag is useful when you want to avoid poms with released versions in all revisions of your trunk or development branch.
Default value is: false.
User property is: suppressCommitBeforeTag.
tag String - The SCM tag to use.
User property is: tag.
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 is: 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:
  • groupId or project.groupId - The groupId of the root project.
  • artifactId or project.artifactId - The artifactId of the root project.
  • version or project.version - The release version of the root project.

Default value is: @{project.artifactId}-@{project.version}.
User property is: tagNameFormat.
updateDependencies boolean 2.0-beta-5 Whether to update dependencies version to the next development version.
Default value is: true.
User property is: updateDependencies.
updateWorkingCopyVersions boolean 2.1 Whether to bump the working copy versions to developmentVersion.
Default value is: true.
User property is: updateWorkingCopyVersions.
useEditMode boolean - Whether to use "edit" mode on the SCM, to lock the file for editing during SCM operations.
Default value is: false.
User property is: useEditMode.
username String - The SCM username to use.
User property is: username.
waitBeforeTagging int 2.2 Wait the specified number of second before creating the tag.
waitBeforeTagging is useful when your source repository is synced between several instances and access to it is determined by geographical location, like the SVN repository at the Apache Software Foundation.
Default value is: 0.
User property is: waitBeforeTagging.

Parameter Details

addSchema:

Whether to add a schema to the POM if it was previously missing on release.
  • Type: boolean
  • Required: No
  • User Property: addSchema
  • Default: true

allowTimestampedSnapshots:

Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.
  • Type: boolean
  • Since: 2.0-beta-7
  • Required: No
  • User Property: ignoreSnapshots
  • Default: false

arguments:

Additional arguments to pass to the Maven executions, separated by spaces.
  • Type: java.lang.String
  • Required: No
  • User Property: arguments

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-5
  • Required: No
  • User Property: autoVersionSubmodules
  • Default: false

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

commitByProject:

Commits to do are atomic or by project.
  • Type: boolean
  • Since: 2.0-beta-5
  • Required: No
  • User Property: commitByProject
  • Default: false

completionGoals:

Goals to run on completion of the preparation step, after transformation back to the next development version but before committing. Space delimited.
  • Type: java.lang.String
  • Since: 2.2
  • Required: No
  • User Property: completionGoals

developmentVersion:

Default version to use for new local working copy.
  • Type: java.lang.String
  • Since: 2.0-beta-8
  • 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
  • Required: No
  • User Property: dryRun
  • Default: false

generateReleasePoms:

Deprecated. Please use release:prepare-with-pom instead.
(no description)
  • Type: boolean
  • Required: No
  • User Property: generateReleasePoms
  • 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 MavenExecutor implementation to use.
  • Type: java.lang.String
  • Since: 2.0-beta-8
  • Required: No
  • User Property: mavenExecutorId
  • Default: invoker

mavenHome:

The M2_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

pomFileName:

The file name of the POM to execute any goals against.
  • Type: java.lang.String
  • Required: No
  • User Property: pomFileName

preparationGoals:

Goals to run as part of the preparation step, after transformation but before committing. Space delimited.
  • Type: java.lang.String
  • Required: No
  • User Property: preparationGoals
  • Default: clean verify

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 ScmProvider.
  • Type: java.util.Map
  • 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

releaseVersion:

Default version to use when preparing a release or a branch.
  • Type: java.lang.String
  • Since: 2.0-beta-8
  • Required: No
  • User Property: releaseVersion

remoteTagging:

Currently only implemented with svn scm.
  • Enables a workaround to prevent issue due to svn client > 1.5.0 (fixed in 1.6.5) (http://jira.codehaus.org/browse/SCM-406)
  • You may not want to use this in conjunction with suppressCommitBeforeTag, such that no poms with released versions are committed to the working copy ever.
  • Type: boolean
  • Since: 2.0-beta-9
  • Required: No
  • User Property: remoteTagging
  • Default: true

resume:

Resume a previous release attempt from the point where it was stopped.
  • Type: boolean
  • Required: No
  • User Property: resume
  • Default: true

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]

suppressCommitBeforeTag:

Whether to suppress a commit of changes to the working copy before the tag is created.

This requires remoteTagging to be set to false.

suppressCommitBeforeTag 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: suppressCommitBeforeTag
  • Default: false

tag:

The SCM tag to use.
  • Type: java.lang.String
  • Required: No
  • User Property: tag

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 or project.groupId - The groupId of the root project.
  • artifactId or project.artifactId - The artifactId of the root project.
  • version or project.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}

updateDependencies:

Whether to update dependencies version to the next development version.
  • Type: boolean
  • Since: 2.0-beta-5
  • Required: No
  • User Property: updateDependencies
  • Default: true

updateWorkingCopyVersions:

Whether to bump the working copy versions to developmentVersion.
  • Type: boolean
  • Since: 2.1
  • 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
  • Required: No
  • User Property: useEditMode
  • Default: false

username:

The SCM username to use.
  • Type: java.lang.String
  • Required: No
  • User Property: username

waitBeforeTagging:

Wait the specified number of second before creating the tag.
waitBeforeTagging is useful when your source repository is synced between several instances and access to it is determined by geographical location, like the SVN repository at the Apache Software Foundation.
  • Type: int
  • Since: 2.2
  • Required: No
  • User Property: waitBeforeTagging
  • Default: 0