Fork me on GitHub

versions:set

Full name:

org.codehaus.mojo:versions-maven-plugin:2.16.2:set

Description:

Sets the current project's version and based on that change propagates that change onto any child modules as necessary.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator goal.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.0-beta-1.

Optional Parameters

Name Type Since Description
<allowSnapshots> boolean 1.0-alpha-1 Whether to allow snapshots when searching for the latest version of an artifact.
Default value is: false.
User property is: allowSnapshots.
<artifactId> String 1.2

The non-interpolated artifactId of the dependency/module to be selected for update.

If not set, will be equal to the non-interpolated artifactId of the project file.

If you wish to update modules of a aggregator regardless of the artifactId, you should set -DartifactId='*' to ignore the artifactId of the current project.

Alternatively, you can use -DprocessAllModules=true

The goal does not interpolate the properties used in artifactId used in the pom.xml file.

The single quotes are only necessary on POSIX-compatible shells (Linux, MacOS, etc.).


User property is: artifactId.
<changeRecorderFormat> String 2.11 The format used to record changes. If "none" is specified, no changes are recorded.
Default value is: none.
User property is: changeRecorderFormat.
<changeRecorderOutputFile> File 2.11 The output file used to record changes.
Default value is: ${project.build.directory}/versions-changes.xml.
User property is: changeRecorderOutputFile.
<generateBackupPoms> boolean 1.0-alpha-3 Controls whether a backup pom should be created.
Default value is: true.
User property is: generateBackupPoms.
<groupId> String 1.2

The non-interpolated groupId of the dependency/module to be selected for update.

If not set, will be equal to the non-interpolated groupId of the project file.

If you wish to update modules of a aggregator regardless of the groupId, you should set -DgroupId='*' to ignore the groupId of the current project.

Alternatively, you can use -DprocessAllModules=true

The goal does not interpolate the properties used in groupId used in the pom.xml file.

The single quotes are only necessary on POSIX-compatible shells (Linux, MacOS, etc.).


User property is: groupId.
<ignoredVersions> Set<String> 2.13.0

Allows specifying ignored versions directly as an alternative to providing the ruleSet parameter; mainly created for -D property usage.

Example: "1\.0\.1,.+-M.,.*-SNAPSHOT"

Currently, this parameter will override the defined ruleSet


User property is: maven.version.ignore.
<newVersion> String 1.0-beta-1 The new version number to set.
User property is: newVersion.
<nextSnapshot> boolean 2.10 Whether to add next version number and -SNAPSHOT to the existing version. Unless specified by nextSnapshotIndexToIncrement, will increment the last minor index of the snapshot version, e.g. the z in x.y.z-SNAPSHOT
Default value is: false.
User property is: nextSnapshot.
<nextSnapshotIndexToIncrement> Integer 2.12

Specifies the version index to increment when using nextSnapshot. Will increment the (1-based, counting from the left, or the most major component) index of the snapshot version, e.g. for -DnextSnapshotIndexToIncrement=1 and the version being 1.2.3-SNAPSHOT, the new version will become 2.2.3-SNAPSHOT.

Only valid with nextSnapshot.


User property is: nextSnapshotIndexToIncrement.
<oldVersion> String 1.2

The non-interpolated version of the dependency/module to be selected for update.

If not set, will be equal to the non-interpolated version of the project file.

If you wish to update modules of a aggregator regardless of the version, you should set -Dversion='*' to ignore the version of the current project.

Alternatively, you can use -DprocessAllModules=true

The goal does not interpolate the properties used in version used in the pom.xml file.

The single quotes are only necessary on POSIX-compatible shells (Linux, MacOS, etc.).


User property is: oldVersion.
<processAllModules> boolean 2.5 If set to true, will process all modules regardless whether they match groupId:artifactId:oldVersion.
Default value is: false.
User property is: processAllModules.
<processDependencies> boolean 1.3 Whether to process the dependencies section of the project.
Default value is: true.
User property is: processDependencies.
<processFromLocalAggregationRoot> boolean 2.9 Whether to start processing at the local aggregation root (which might be a parent module of that module where Maven is executed in, and the version change may affect parent and sibling modules). Setting to false makes sure only the module (and it's submodules) where Maven is executed for is affected.
Default value is: true.
User property is: processFromLocalAggregationRoot.
<processParent> boolean 1.3 Whether to process the parent of the project.
Default value is: true.
User property is: processParent.
<processPlugins> boolean 1.3 Whether to process the plugins section of the project.
Default value is: true.
User property is: processPlugins.
<processProject> boolean 1.3 Whether to process the project version.
Default value is: true.
User property is: processProject.
<removeSnapshot> boolean 2.10 Whether to remove -SNAPSHOT from the existing version.
Default value is: false.
User property is: removeSnapshot.
<ruleSet> RuleSet 2.13.0

Allows specifying the org.codehaus.mojo.versions.model.RuleSet object describing rules on artifact versions to ignore when considering updates.


See also: Using the ruleSet element in the POM
<rulesUri> String 1.0-alpha-3 URI of a ruleSet file containing the rules that control how to compare version numbers. The URI could be either a Wagon URI or a classpath URI (e.g. classpath:///package/sub/package/rules.xml).
User property is: maven.version.rules.
<serverId> String 1.0-alpha-3 settings.xml's server id for the URL. This is used when wagon needs extra authentication information.
Default value is: serverId.
User property is: maven.version.rules.serverId.
<updateBuildOutputTimestamp> boolean 2.10 Deprecated. Whether to update the project.build.outputTimestamp property in the POM when setting version.
Default value is: true.
User property is: updateBuildOutputTimestamp.
<updateBuildOutputTimestampPolicy> String 2.12 Whether to update the project.build.outputTimestamp property in the POM when setting version. Valid values are: onchange, which will only change outputTimestamp for changed POMs, always, never.
Default value is: onchange.
User property is: updateBuildOutputTimestampPolicy.
<updateMatchingVersions> boolean 1.3 Whether matching versions explicitly specified (as /project/version) in child modules should be updated.
Default value is: true.
User property is: updateMatchingVersions.

Parameter Details

<allowSnapshots>

Whether to allow snapshots when searching for the latest version of an artifact.
  • Type: boolean
  • Since: 1.0-alpha-1
  • Required: No
  • User Property: allowSnapshots
  • Default: false

<artifactId>

The non-interpolated artifactId of the dependency/module to be selected for update.

If not set, will be equal to the non-interpolated artifactId of the project file.

If you wish to update modules of a aggregator regardless of the artifactId, you should set -DartifactId='*' to ignore the artifactId of the current project.

Alternatively, you can use -DprocessAllModules=true

The goal does not interpolate the properties used in artifactId used in the pom.xml file.

The single quotes are only necessary on POSIX-compatible shells (Linux, MacOS, etc.).

  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: artifactId

<changeRecorderFormat>

The format used to record changes. If "none" is specified, no changes are recorded.
  • Type: java.lang.String
  • Since: 2.11
  • Required: No
  • User Property: changeRecorderFormat
  • Default: none

<changeRecorderOutputFile>

The output file used to record changes.
  • Type: java.io.File
  • Since: 2.11
  • Required: No
  • User Property: changeRecorderOutputFile
  • Default: ${project.build.directory}/versions-changes.xml

<generateBackupPoms>

Controls whether a backup pom should be created.
  • Type: boolean
  • Since: 1.0-alpha-3
  • Required: No
  • User Property: generateBackupPoms
  • Default: true

<groupId>

The non-interpolated groupId of the dependency/module to be selected for update.

If not set, will be equal to the non-interpolated groupId of the project file.

If you wish to update modules of a aggregator regardless of the groupId, you should set -DgroupId='*' to ignore the groupId of the current project.

Alternatively, you can use -DprocessAllModules=true

The goal does not interpolate the properties used in groupId used in the pom.xml file.

The single quotes are only necessary on POSIX-compatible shells (Linux, MacOS, etc.).

  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: groupId

<ignoredVersions>

Allows specifying ignored versions directly as an alternative to providing the ruleSet parameter; mainly created for -D property usage.

Example: "1\.0\.1,.+-M.,.*-SNAPSHOT"

Currently, this parameter will override the defined ruleSet

  • Type: java.util.Set<java.lang.String>
  • Since: 2.13.0
  • Required: No
  • User Property: maven.version.ignore

<newVersion>

The new version number to set.
  • Type: java.lang.String
  • Since: 1.0-beta-1
  • Required: No
  • User Property: newVersion

<nextSnapshot>

Whether to add next version number and -SNAPSHOT to the existing version. Unless specified by nextSnapshotIndexToIncrement, will increment the last minor index of the snapshot version, e.g. the z in x.y.z-SNAPSHOT
  • Type: boolean
  • Since: 2.10
  • Required: No
  • User Property: nextSnapshot
  • Default: false

<nextSnapshotIndexToIncrement>

Specifies the version index to increment when using nextSnapshot. Will increment the (1-based, counting from the left, or the most major component) index of the snapshot version, e.g. for -DnextSnapshotIndexToIncrement=1 and the version being 1.2.3-SNAPSHOT, the new version will become 2.2.3-SNAPSHOT.

Only valid with nextSnapshot.

  • Type: java.lang.Integer
  • Since: 2.12
  • Required: No
  • User Property: nextSnapshotIndexToIncrement

<oldVersion>

The non-interpolated version of the dependency/module to be selected for update.

If not set, will be equal to the non-interpolated version of the project file.

If you wish to update modules of a aggregator regardless of the version, you should set -Dversion='*' to ignore the version of the current project.

Alternatively, you can use -DprocessAllModules=true

The goal does not interpolate the properties used in version used in the pom.xml file.

The single quotes are only necessary on POSIX-compatible shells (Linux, MacOS, etc.).

  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: oldVersion

<processAllModules>

If set to true, will process all modules regardless whether they match groupId:artifactId:oldVersion.
  • Type: boolean
  • Since: 2.5
  • Required: No
  • User Property: processAllModules
  • Default: false

<processDependencies>

Whether to process the dependencies section of the project.
  • Type: boolean
  • Since: 1.3
  • Required: No
  • User Property: processDependencies
  • Default: true

<processFromLocalAggregationRoot>

Whether to start processing at the local aggregation root (which might be a parent module of that module where Maven is executed in, and the version change may affect parent and sibling modules). Setting to false makes sure only the module (and it's submodules) where Maven is executed for is affected.
  • Type: boolean
  • Since: 2.9
  • Required: No
  • User Property: processFromLocalAggregationRoot
  • Default: true

<processParent>

Whether to process the parent of the project.
  • Type: boolean
  • Since: 1.3
  • Required: No
  • User Property: processParent
  • Default: true

<processPlugins>

Whether to process the plugins section of the project.
  • Type: boolean
  • Since: 1.3
  • Required: No
  • User Property: processPlugins
  • Default: true

<processProject>

Whether to process the project version.
  • Type: boolean
  • Since: 1.3
  • Required: No
  • User Property: processProject
  • Default: true

<removeSnapshot>

Whether to remove -SNAPSHOT from the existing version.
  • Type: boolean
  • Since: 2.10
  • Required: No
  • User Property: removeSnapshot
  • Default: false

<ruleSet>

Allows specifying the org.codehaus.mojo.versions.model.RuleSet object describing rules on artifact versions to ignore when considering updates.


See also: Using the ruleSet element in the POM
  • Type: org.codehaus.mojo.versions.model.RuleSet
  • Since: 2.13.0
  • Required: No

<rulesUri>

URI of a ruleSet file containing the rules that control how to compare version numbers. The URI could be either a Wagon URI or a classpath URI (e.g. classpath:///package/sub/package/rules.xml).
  • Type: java.lang.String
  • Since: 1.0-alpha-3
  • Required: No
  • User Property: maven.version.rules

<serverId>

settings.xml's server id for the URL. This is used when wagon needs extra authentication information.
  • Type: java.lang.String
  • Since: 1.0-alpha-3
  • Required: No
  • User Property: maven.version.rules.serverId
  • Default: serverId

<updateBuildOutputTimestamp>

Deprecated. please use updateBuildOutputTimestampPolicy instead
Whether to update the project.build.outputTimestamp property in the POM when setting version.
  • Type: boolean
  • Since: 2.10
  • Required: No
  • User Property: updateBuildOutputTimestamp
  • Default: true

<updateBuildOutputTimestampPolicy>

Whether to update the project.build.outputTimestamp property in the POM when setting version. Valid values are: onchange, which will only change outputTimestamp for changed POMs, always, never.
  • Type: java.lang.String
  • Since: 2.12
  • Required: No
  • User Property: updateBuildOutputTimestampPolicy
  • Default: onchange

<updateMatchingVersions>

Whether matching versions explicitly specified (as /project/version) in child modules should be updated.
  • Type: boolean
  • Since: 1.3
  • Required: No
  • User Property: updateMatchingVersions
  • Default: true