Skip to content

Print info about finally selected toolchain #141

@HannesWell

Description

@HannesWell

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:

getLog().debug("Found matching JDK toolchain: " + toolchain);

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions