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

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

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

   > Personally i use JAVA${major}_HOME and wire it in pom in executable or jvm 
properties today.
   > 
   > But what I dont like in this pr is that it adds complexity to the 
complexity of toolchain whereas if you totally drop toolchain everything is 
simple.
   > 
   > Dont take it as a -1 but more as not something to promote nor recommend to 
end users IMHO.
   
   I'm not sure how it really adds complexity.  I agree toolchains can be seen 
as overly complicated when you can use the `<jvm>` arg for surefire.  But the 
compiler cannot for example and in such cases, you have to use toolchains.  So 
let's simplify their usage.
   
   Note that with this PR, you don't have to generate the toolchains xml, they 
are automatically discovered.  So with no toolchains preconfigured, if you have 
an env var `JAVA17_HOME`, you can very easily select it as the toolchain:
   ```
   ➜  maven-toolchains-plugin git:(discovered-toolchains) echo $JAVA17_HOME
   /Users/gnodet/.sdkman/candidates/java/17.0.9-graalce
   ➜  maven-toolchains-plugin git:(discovered-toolchains) mvn 
org.apache.maven.plugins:maven-toolchains-plugin:3.1.1-SNAPSHOT:select-jdk-toolchain
 -Dtoolchain.jdk.env=JAVA17_HOME
   Using 
MAVEN_CENTRAL=http://old-broken-macbook-pro.local:8082/artifactory/maven-remote/
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] ----------< org.apache.maven.plugins:maven-toolchains-plugin 
>----------
   [INFO] Building Apache Maven Toolchains Plugin 3.1.1-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] ----------------------------[ maven-plugin 
]----------------------------
   [INFO] 
   [INFO] -

> 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