Fork me on GitHub

versions:compare-dependencies

Full name:

org.codehaus.mojo:versions-maven-plugin:2.16.2:compare-dependencies

Description:

Compare dependency versions of the current project to dependencies or dependency management of a remote repository project. Can optionally update locally the project instead of reporting the comparison

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.3.

Required Parameters

Name Type Since Description
<remotePom> String - The groupId, artifactId, and version of the remote project (POM) to which we are comparing. This should be in the form "groupId:artifactId:version"
User property is: remotePom.

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.
<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.
<excludeReactor> boolean 1.0-alpha-3 Whether to skip processing dependencies that are produced as part of the current reactor.
Default value is: true.
User property is: 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 is: excludes.
<generateBackupPoms> boolean 1.0-alpha-3 Controls whether a backup pom should be created.
Default value is: true.
User property is: generateBackupPoms.
<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.
<ignoreRemoteDependencies> boolean - Ignore the list of remote dependencies and only compare the remote dependencyManagement
Default value is: false.
User property is: ignoreRemoteDependencies.
<ignoreRemoteDependencyManagement> boolean - Ignore the remote dependency management and only check against the actual dependencies of the remote project
Default value is: false.
User property is: ignoreRemoteDependencyManagement.
<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 is: includes.
<processDependencies> boolean 1.0-alpha-3 Whether to process the dependencies section of the project.
Default value is: true.
User property is: processDependencies.
<processDependencyManagement> boolean 1.0-alpha-3 Whether to process the dependencyManagement section of the project.
Default value is: true.
User property is: processDependencyManagement.
<processParent> boolean 2.3 Whether to process the parent section of the project. If not set will default to false.
Default value is: false.
User property is: processParent.
<reportMode> boolean - Display the dependency version differences on the command line, but do not update the versions in the current pom. If updateDependencies is set to "true" this will automatically be set to false.
Default value is: true.
User property is: reportMode.
<reportOutputFile> File - If the output file is set, the diff report will be written to this file.
User property is: reportOutputFile.
<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.
<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 is: 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 value is: serverId.
User property is: maven.version.rules.serverId.
<updateDependencies> boolean - Update dependency versions in the current POM.
Default value is: false.
User property is: updateDependencies.
<updatePropertyVersions> boolean - Update dependency versions stored in properties
Default value is: false.
User property is: updatePropertyVersions.

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

<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

<excludeReactor>

Whether to skip processing dependencies that are produced as part of the current reactor.
  • Type: boolean
  • Since: 1.0-alpha-3
  • Required: No
  • User Property: excludeReactor
  • Default: true

<excludes>

A list of artifact patterns to exclude. Follows the pattern "groupId:artifactId:type:classifier:version". This configuration setting is ignored if excludesList is defined.
  • Type: java.lang.String[]
  • Since: 1.0-beta-1
  • Required: No

<excludesList>

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.
  • Type: java.lang.String
  • Since: 1.0-beta-1
  • Required: No
  • User Property: excludes

<generateBackupPoms>

Controls whether a backup pom should be created.
  • 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

<ignoreRemoteDependencies>

Ignore the list of remote dependencies and only compare the remote dependencyManagement
  • Type: boolean
  • Required: No
  • User Property: ignoreRemoteDependencies
  • Default: false

<ignoreRemoteDependencyManagement>

Ignore the remote dependency management and only check against the actual dependencies of the remote project
  • Type: boolean
  • Required: No
  • User Property: ignoreRemoteDependencyManagement
  • Default: false

<includes>

A list of artifact patterns to include. Follows the pattern "groupId:artifactId:type:classifier:version". This configuration setting is ignored if includesList is defined.
  • Type: java.lang.String[]
  • Since: 1.0-beta-1
  • Required: No

<includesList>

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.
  • Type: java.lang.String
  • Since: 1.0-beta-1
  • Required: No
  • User Property: includes

<processDependencies>

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

<processDependencyManagement>

Whether to process the dependencyManagement section of the project.
  • Type: boolean
  • Since: 1.0-alpha-3
  • Required: No
  • User Property: processDependencyManagement
  • Default: true

<processParent>

Whether to process the parent section of the project. If not set will default to false.
  • Type: boolean
  • Since: 2.3
  • Required: No
  • User Property: processParent
  • Default: false

<remotePom>

The groupId, artifactId, and version of the remote project (POM) to which we are comparing. This should be in the form "groupId:artifactId:version"
  • Type: java.lang.String
  • Required: Yes
  • User Property: remotePom

<reportMode>

Display the dependency version differences on the command line, but do not update the versions in the current pom. If updateDependencies is set to "true" this will automatically be set to false.
  • Type: boolean
  • Required: No
  • User Property: reportMode
  • Default: true

<reportOutputFile>

If the output file is set, the diff report will be written to this file.
  • Type: java.io.File
  • Required: No
  • User Property: reportOutputFile

<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

<scope>

a scope to use to filter the artifacts matching the asked scope (as well as the ones implied by maven)
  • Type: java.lang.String
  • Since: 2.15
  • Required: No
  • User Property: scope

<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

<updateDependencies>

Update dependency versions in the current POM.
  • Type: boolean
  • Required: No
  • User Property: updateDependencies
  • Default: false

<updatePropertyVersions>

Update dependency versions stored in properties
  • Type: boolean
  • Required: No
  • User Property: updatePropertyVersions
  • Default: false