gnodet commented on code in PR #14:
URL: 
https://github.com/apache/maven-toolchains-plugin/pull/14#discussion_r1509160636


##########
src/site/apt/toolchains/discovery.apt.vm:
##########
@@ -0,0 +1,148 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+  ------
+  Discovery mechanism
+  ------
+  Guillaume Nodet
+  ------
+  2024-02-28
+  ------
+
+JDK Toolchain discovery mechanism
+
+  Since version 3.2.0, the plugin provides a heuristic to discover installed 
JDK toolchains, by looking
+  at known installation directories and at environment variables.
+
+  The list of discovered toolchains can be easily displayed using the command
+  <<<mvn 
org.apache.maven.plugins:maven-toolchains-plugin:${project.version}:display-discovered-jdk-toolchains>>>.
+  This will print something like:
+
++---+
+[INFO] Discovered 10 JDK toolchains:
+[INFO]   - /Users/gnodet/.sdkman/candidates/java/21.0.2-graalce
+[INFO]     provides:
+[INFO]       version: 21.0.2
+[INFO]       runtime.name: OpenJDK Runtime Environment
+[INFO]       runtime.version: 21.0.2+13-jvmci-23.1-b30
+[INFO]       vendor: GraalVM Community
+[INFO]       vendor.version: GraalVM CE 21.0.2+13.1
+[INFO]       current: true
+[INFO]       lts: true
+[INFO]       env: JAVA_HOME,JAVA21_HOME
+...
++---+
+
+  If you have installed JDK using standard tools and they are not listed here, 
feel free

Review Comment:
   Yes, exactly as pointed by @mthmulders  with scoop installer on windows.  
Given this is a heuristic, it can be improve over time.  I'll rephrase.



-- 
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