Skip to content

Commit 88bca2b

Browse files
committed
docs: allowing automatic Maven version resolution via version range.
1 parent 0c361a7 commit 88bca2b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • maven-wrapper-plugin/src/site/markdown

maven-wrapper-plugin/src/site/markdown/usage.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ You can still use `-Dtype={type}` to change the distribution type for an existin
5555
Maven Version
5656
-------------
5757
By default the plugin will assume the same version as the Maven runtime (calling `mvn -v`). But you can pick a different version.
58-
You can call `mvn wrapper:wrapper -Dmaven=x`, where `x` is any valid Apache Maven Release (see [Maven Central](https://central.sonatype.com/artifact/org.apache.maven/apache-maven/versions)).
59-
Another option is to adjust the `distributionUrl` in `.mvn/wrapper/maven-wrapper.properties`.
58+
You can call `mvn wrapper:wrapper -Dmaven=x`, where `x` is any valid Apache Maven Release (see [Maven Central](https://central.sonatype.com/artifact/org.apache.maven/apache-maven/versions))
59+
or a version range (see [Dependency Version Requirement Specification](https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification)).
60+
In the latter case, mind that round brackets must be escaped with a backslash, as in `-Dmaven=[3.0,4.0\)`,
61+
or the whole argument must be quoted: `-Dmaven="[3.0,4.0)"`.
62+
63+
Another option is to adjust the `distributionUrl` in `.mvn/wrapper/maven-wrapper.properties` with the specific version.
6064

6165
Debugging
6266
---------

0 commit comments

Comments
 (0)