chadlwilson commented on issue #3382:
URL: 
https://github.com/apache/maven-surefire/issues/3382#issuecomment-6131644792

   I thought I wrote the use case above, but so that you can run tests with one 
(auto-discovered) toolchain and use another to run maven itself or as your 
default.
   
   This is required in many cases where a plugin needs, say, Java 17 but you 
want to run tests on Java 11 because that's your compile target. Or if you wish 
to always compile with a recent java but test in a parallel matrix across 
multiple javas.
   
   Having to manually configure toolchains is a chore. GHA can do this via 
setup-java but locally it's convenient to auto-discover so you can use java 
version managers to create env vars that Maven can auto-discover without a 
whole lot of boiler plate.
   
   In any case, irs not clear to me why surefire should be able to vary its 
toolchains to use a manually defined one, but not consume an auto-discovered 
one. Shouldnt all toolchains be first-class citizens?
   
   If that's still not clear I'll create a sample config when i have a bit more 
time.


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