HannesWell opened a new issue, #141:
URL: https://github.com/apache/maven-toolchains-plugin/issues/141

   ### New feature, improvement proposal
   
   The `select-jdk-toolchain` goal is very handy but one thing I'm missing is 
an info print-out about the finally selected toolchain.
   Currently the print-out is for example only
   ```
   [INFO] --- toolchains:3.2.0:select-jdk-toolchain (default) @ my.project ---
   [INFO] Found 4 possible jdks: [C:\java\temurin-jdk-25, C:\java\temurin-jdk8, 
C:\java\graalvm-ce-java17, C:\java\temurin-jdk-21]
   ```
   Listing all JDK's found is good, but I find it confusing that the finally 
selected one is not specified and then I'm concerned the wrong one might be 
selected.
   The old `toolchain` goal is a bit more specific in this regard:
   ```
    [INFO] --- toolchains:3.2.0:toolchain (default) @ my.project ---
   [INFO] Required toolchain: jdk [ version='17' ]
   [INFO] Found matching toolchain for type jdk: 
JDK[/java/temurin/jdk-17/latest]
   ```
   There is already a corresponding debug print-out, and with debug print-out 
the information is satisfying:
   
https://github.com/apache/maven-toolchains-plugin/blob/1f2ca233a1048e32b9efad8c32f9e613ee013ba1/src/main/java/org/apache/maven/plugins/toolchain/jdk/SelectJdkToolchainMojo.java#L232
   
   My suggestion is to turn that into a info message and maybe adjust the 
wording to `Selected matching JDK toolchain`.
   If you agree I can create a PR to adjust it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to