Fork me on GitHub

versions:update-property

Full name:

org.codehaus.mojo:versions-maven-plugin:2.5:update-property

Description:

Sets a property to the latest version in a given range of associated artifacts.

Attributes:

  • Requires a Maven project to be executed.
  • Executes by direct invocation only.
  • Since version: 1.3.

Optional Parameters

Name Type Since Description
allowDowngrade boolean 3.0.0 If a property points to a version like 1.2.3 and your repository contains versions like 1.2.3 and 1.1.0 without settings this to true the property will never being changed back to 1.1.0 by using -DnewVersion=[1.1.0].
Default value is: false.
User property is: allowDowngrade.
allowIncrementalUpdates boolean 2.4 Whether to allow the incremental version number to be changed.
Default value is: true.
User property is: allowIncrementalUpdates.
allowMajorUpdates boolean 2.4 Whether to allow the major version number to be changed.
Default value is: true.
User property is: allowMajorUpdates.
allowMinorUpdates boolean 2.4 Whether to allow the minor version number to be changed.
Default value is: true.
User property is: allowMinorUpdates.
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.
autoLinkItems boolean 1.0-alpha-2 Whether properties linking versions should be auto-detected or not.
Default value is: true.
User property is: autoLinkItems.
generateBackupPoms boolean 1.0-alpha-3 Controls whether a backup pom should be created.
Default value is: true.
User property is: generateBackupPoms.
newVersion String 1.3 The new version to set the property to (can be a version range to find a version within).
  • 1.0x >= 1.0. The default Maven meaning for 1.0 is everything (,) but with 1.0 recommended.
  • [1.0,2.0) Versions 1.0 (included) to 2.0 (not included)
  • [1.0,2.0] Versions 1.0 to 2.0 (both included)
  • [1.5,) Versions 1.5 and higher
  • (,1.0],[1.2,) Versions up to 1.0 (included) and 1.2 or higher
If you like to define the version to be used exactly you have to use it like this: -DnewVersion=[19.0] otherwise a newer existing version will be used. If you need to downgrade a version you have to define -DallowDowngrade=true as well otherwise the version will be kept.
User property is: newVersion.
property String 1.3 A property to update.
User property is: property.
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.

Parameter Details

allowDowngrade:

If a property points to a version like 1.2.3 and your repository contains versions like 1.2.3 and 1.1.0 without settings this to true the property will never being changed back to 1.1.0 by using -DnewVersion=[1.1.0].
  • Type: boolean
  • Since: 3.0.0
  • Required: No
  • User Property: allowDowngrade
  • Default: false

allowIncrementalUpdates:

Whether to allow the incremental version number to be changed.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • User Property: allowIncrementalUpdates
  • Default: true

allowMajorUpdates:

Whether to allow the major version number to be changed.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • User Property: allowMajorUpdates
  • Default: true

allowMinorUpdates:

Whether to allow the minor version number to be changed.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • User Property: allowMinorUpdates
  • Default: true

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

autoLinkItems:

Whether properties linking versions should be auto-detected or not.
  • Type: boolean
  • Since: 1.0-alpha-2
  • Required: No
  • User Property: autoLinkItems
  • Default: true

generateBackupPoms:

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

newVersion:

The new version to set the property to (can be a version range to find a version within).
  • 1.0x >= 1.0. The default Maven meaning for 1.0 is everything (,) but with 1.0 recommended.
  • [1.0,2.0) Versions 1.0 (included) to 2.0 (not included)
  • [1.0,2.0] Versions 1.0 to 2.0 (both included)
  • [1.5,) Versions 1.5 and higher
  • (,1.0],[1.2,) Versions up to 1.0 (included) and 1.2 or higher
If you like to define the version to be used exactly you have to use it like this: -DnewVersion=[19.0] otherwise a newer existing version will be used. If you need to downgrade a version you have to define -DallowDowngrade=true as well otherwise the version will be kept.
  • Type: java.lang.String
  • Since: 1.3
  • Required: No
  • User Property: newVersion

property:

A property to update.
  • Type: java.lang.String
  • Since: 1.3
  • Required: No
  • User Property: property

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