Fork me on GitHub

resolver:resolve-range

Full name:

com.subshell.maven:resolver-maven-plugin:1.0.1:resolve-range

Description:

Resolves a version range to the highest matching version. By default, snapshots are excluded, as a workaround for MNG-3092.

For the version range format, see GenericVersionScheme

Command-line example:

mvn com.subshell.maven:resolver-maven-plugin:resolve-range \
    -Dresolve.groupId=org.apache.maven -Dresolve.artifactId=maven-model "-Dresolve.versionRange=[3.1.0, 3.3.max]" \
    -Dresolve.print -q

Attributes:

  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: validate.

Required Parameters

Name Type Since Description
artifactId String - The artifact id of the artifact to resolve.
User property is: resolve.artifactId.
groupId String - The group id of the artifact to resolve.
User property is: resolve.groupId.
version String - The version range of the artifact to resolve.
User property is: resolve.versionRange.

Optional Parameters

Name Type Since Description
includeSnapshots boolean - Set to true to include snapshot versions in the resolution.
Default value is: false.
User property is: resolve.includeSnapshots.
print boolean - If true, the highest matching version is printed directly to the console. This can be used with mvn -q.
User property is: resolve.print.
property String - The name of the property that will be set to the highest matching version.

Parameter Details

artifactId:

The artifact id of the artifact to resolve.
  • Type: java.lang.String
  • Required: Yes
  • User Property: resolve.artifactId

groupId:

The group id of the artifact to resolve.
  • Type: java.lang.String
  • Required: Yes
  • User Property: resolve.groupId

includeSnapshots:

Set to true to include snapshot versions in the resolution.
  • Type: boolean
  • Required: No
  • User Property: resolve.includeSnapshots
  • Default: false

print:

If true, the highest matching version is printed directly to the console. This can be used with mvn -q.
  • Type: boolean
  • Required: No
  • User Property: resolve.print

property:

The name of the property that will be set to the highest matching version.
  • Type: java.lang.String
  • Required: No

version:

The version range of the artifact to resolve.
  • Type: java.lang.String
  • Required: Yes
  • User Property: resolve.versionRange