versions:update-property
Full name:
org.codehaus.mojo:versions-maven-plugin:2.18.0: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.
- The goal is thread-safe and supports parallel builds.
- 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: false User Property: allowDowngrade |
<allowIncrementalUpdates> |
boolean |
2.4 |
Whether to allow the incremental version number to be changed. Note: Default: true User Property: allowIncrementalUpdates |
<allowMajorUpdates> |
boolean |
2.4 |
Whether to allow the major version number to be changed. Default: true User Property: allowMajorUpdates |
<allowMinorUpdates> |
boolean |
2.4 |
Whether to allow the minor version number to be changed. Note: Default: true User Property: allowMinorUpdates |
<allowSnapshots> |
boolean |
1.0-alpha-1 |
Whether to allow snapshots when searching for the latest version of an artifact. Default: false User Property: allowSnapshots |
<autoLinkItems> |
boolean |
1.0-alpha-2 |
Whether properties linking versions should be auto-detected or not. Default: true User Property: autoLinkItems |
<changeRecorderFormat> |
String |
2.11 |
The format used to record changes. If "none" is specified, no changes are recorded. Default: none User Property: changeRecorderFormat |
<changeRecorderOutputFile> |
File |
2.11 |
The output file used to record changes. Default: ${project.build.directory}/versions-changes.xml User Property: changeRecorderOutputFile |
<excludeReactor> |
boolean |
1.0-alpha-3 |
Whether to skip processing dependencies that are produced as part of the current reactor. Default: true User Property: excludeReactor |
<excludes> |
String[] |
1.0-beta-1 |
A list of artifact patterns to exclude. Follows the pattern "groupId:artifactId:type:classifier:version". This configuration setting is ignored if excludesList is defined. |
<excludesList> |
String |
1.0-beta-1 |
A comma separated list of artifact patterns to exclude. Follows the pattern "groupId:artifactId:type:classifier:version". Designed to allow specifying the set of excludes from the command line. When specifying excludes from the pom, use the excludes configuration instead. If this property is specified then the excludes configuration is ignored.User Property: excludes |
<generateBackupPoms> |
boolean |
1.0-alpha-3 |
Controls whether a backup pom should be created. Default: true User Property: generateBackupPoms |
<ignoredVersions> |
Set<String> |
2.13.0 |
Allows specifying ignored versions directly as an alternative to providing the ruleSet parameter; mainly created for Example: Currently, this parameter will override the defined User Property: maven.version.ignore |
<includeParent> |
boolean |
2.14.0 |
Whether to include parent POMs in the search. Default: Setting this to Default: true User Property: includeParent |
<includes> |
String[] |
1.0-beta-1 |
A list of artifact patterns to include. Follows the pattern "groupId:artifactId:type:classifier:version". This configuration setting is ignored if includesList is defined. |
<includesList> |
String |
1.0-beta-1 |
A comma separated list of artifact patterns to include. Follows the pattern "groupId:artifactId:type:classifier:version". Designed to allow specifying the set of includes from the command line. When specifying includes from the pom, use the includes configuration instead. If this property is specified then the includes configuration is ignored.User Property: includes |
<newVersion> |
String |
1.3 |
The new version to set the property to (can be a version range to find a version within).
-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: newVersion |
<processDependencies> |
boolean |
1.0-alpha-3 |
Whether to process the dependencies section of the project. Default: true User Property: processDependencies |
<processDependencyManagement> |
boolean |
1.0-alpha-3 |
Whether to process the dependencyManagement section of the project. Default: true User Property: processDependencyManagement |
<processParent> |
boolean |
2.3 |
Whether to process the parent section of the project. If not set will default to false. Default: false User Property: processParent |
<property> |
String |
1.3 |
A property to update. User Property: property |
<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: maven.version.rules |
<scope> |
String |
2.15 |
a scope to use to filter the artifacts matching the asked scope (as well as the ones implied by maven) User Property: scope |
<serverId> |
String |
1.0-alpha-3 |
settings.xml's server id for the URL. This is used when wagon needs extra authentication information. Default: serverId User Property: maven.version.rules.serverId |
Parameter Details
<allowDowngrade>
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.
Note: false
also implies allowMajorUpdates and allowMinorUpdates false
- Type:
boolean
- Since:
2.4
- Required:
No
- User Property:
allowIncrementalUpdates
- Default:
true
<allowMajorUpdates>
- Type:
boolean
- Since:
2.4
- Required:
No
- User Property:
allowMajorUpdates
- Default:
true
<allowMinorUpdates>
Whether to allow the minor version number to be changed.
Note: false
also implies allowMajorUpdates false
- Type:
boolean
- Since:
2.4
- Required:
No
- User Property:
allowMinorUpdates
- Default:
true
<allowSnapshots>
- Type:
boolean
- Since:
1.0-alpha-1
- Required:
No
- User Property:
allowSnapshots
- Default:
false
<autoLinkItems>
- Type:
boolean
- Since:
1.0-alpha-2
- Required:
No
- User Property:
autoLinkItems
- Default:
true
<changeRecorderFormat>
- Type:
java.lang.String
- Since:
2.11
- Required:
No
- User Property:
changeRecorderFormat
- Default:
none
<changeRecorderOutputFile>
- Type:
java.io.File
- Since:
2.11
- Required:
No
- User Property:
changeRecorderOutputFile
- Default:
${project.build.directory}/versions-changes.xml
<excludeReactor>
- Type:
boolean
- Since:
1.0-alpha-3
- Required:
No
- User Property:
excludeReactor
- Default:
true
<excludes>
excludesList
is defined.- Type:
java.lang.String[]
- Since:
1.0-beta-1
- Required:
No
<excludesList>
excludes
configuration instead. If this property is specified then the excludes
configuration is ignored.- Type:
java.lang.String
- Since:
1.0-beta-1
- Required:
No
- User Property:
excludes
<generateBackupPoms>
- Type:
boolean
- Since:
1.0-alpha-3
- Required:
No
- User Property:
generateBackupPoms
- Default:
true
<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
<includeParent>
Whether to include parent POMs in the search. Default: true
Setting this to false
can speed up execution, but will not resolve property-bound dependencies, defined in parent POMs.
- Type:
boolean
- Since:
2.14.0
- Required:
No
- User Property:
includeParent
- Default:
true
<includes>
includesList
is defined.- Type:
java.lang.String[]
- Since:
1.0-beta-1
- Required:
No
<includesList>
includes
configuration instead. If this property is specified then the includes
configuration is ignored.- Type:
java.lang.String
- Since:
1.0-beta-1
- Required:
No
- User Property:
includes
<newVersion>
1.0
x >= 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
-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
<processDependencies>
- Type:
boolean
- Since:
1.0-alpha-3
- Required:
No
- User Property:
processDependencies
- Default:
true
<processDependencyManagement>
- Type:
boolean
- Since:
1.0-alpha-3
- Required:
No
- User Property:
processDependencyManagement
- Default:
true
<processParent>
- Type:
boolean
- Since:
2.3
- Required:
No
- User Property:
processParent
- Default:
false
<property>
- Type:
java.lang.String
- Since:
1.3
- Required:
No
- User Property:
property
<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>
classpath:///package/sub/package/rules.xml
).- Type:
java.lang.String
- Since:
1.0-alpha-3
- Required:
No
- User Property:
maven.version.rules
<scope>
- Type:
java.lang.String
- Since:
2.15
- Required:
No
- User Property:
scope
<serverId>
- Type:
java.lang.String
- Since:
1.0-alpha-3
- Required:
No
- User Property:
maven.version.rules.serverId
- Default:
serverId