This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push:
new 6a75a847e Use a version range in the jdkToolchain example
6a75a847e is described below
commit 6a75a847edcc4a8e58b6ff7fb09c5859267fe4ed
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 3 21:42:53 2026 +0100
Use a version range in the jdkToolchain example
A single version in jdkToolchain must equal the version in toolchains.xml,
so <version>8</version> matches only an entry labelled exactly 8, not a
discovered JDK that reports 1.8.0_504. Show the range [1.8,1.9) and say
how single versions and the other elements are matched, as the Guide to
Using Toolchains on maven.apache.org now does.
---
.../src/site/markdown/examples/toolchains.md.vm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/maven-surefire-plugin/src/site/markdown/examples/toolchains.md.vm
b/maven-surefire-plugin/src/site/markdown/examples/toolchains.md.vm
index 55467105a..58b978bdc 100644
--- a/maven-surefire-plugin/src/site/markdown/examples/toolchains.md.vm
+++ b/maven-surefire-plugin/src/site/markdown/examples/toolchains.md.vm
@@ -39,14 +39,19 @@ Configuring a different jvm for running tests using
toolchains
<configuration>
[...]
<jdkToolchain>
- <version>8</version>
+ <version>[1.8,1.9)</version>
<vendor>zulu</vendor>
</jdkToolchain>
[...]
</configuration>
```
-The above example assumes that your \`toolchains.xml\` contains a valid entry
with these values.
+The above example assumes that your `toolchains.xml` contains a valid entry
with these values.
+
+A single version must equal the one in `toolchains.xml`: `8` matches only an
entry whose version is exactly `8`, not
+one that provides `1.8.0_504`, and `17` does not match `17.0.20`. JDKs
discovered by the toolchains plugin report
+their full version, so use a range such as `[1.8,1.9)` or `[17,18)` to accept
any update of a Java release. Other
+elements, like `vendor`, must equal the value in `toolchains.xml`.
Minimum Java Version for Toolchains
-----------------------------------