[ 
https://issues.apache.org/jira/browse/MTOOLCHAINS-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17824311#comment-17824311
 ] 

ASF GitHub Bot commented on MTOOLCHAINS-49:
-------------------------------------------

gnodet commented on PR #14:
URL: 
https://github.com/apache/maven-toolchains-plugin/pull/14#issuecomment-1982971274

   > With your latest additions, the `display-discovered-jdk-toolchains` mojo 
reports 9 JDK toolchains, including the two versions of openjdk21 I have 
installed.
   
   Yes, that was my initial idea. The goal is to discover all available JDK and 
*then* use some rules to select the one the user wants. There won't be exact 
doublons because symlinks are resolved to real path, so the "current" one won't 
be provided as a different JDK.
   
   To select the matching JDK, we have multiple variables that can be used to 
match and sort JDKs.  If that's not sufficient, the user can use the 
`generate-jdk-toolchains-xml` to generate a `toolchains.xml` file and hack it 
at will.
   If disk scanning is too expensive, I'd rather provide a better heuristic 
(such as providing a glob to match scoop packages or something like that).  I 
think we may have a missing cache so that we don't do the discovery more than 
once in a given maven session...  I'll add that.




> Automatic discovery of JDK toolchains
> -------------------------------------
>
>                 Key: MTOOLCHAINS-49
>                 URL: https://issues.apache.org/jira/browse/MTOOLCHAINS-49
>             Project: Maven Toolchains Plugin
>          Issue Type: Improvement
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to