The toolchains discovery has been released a few months ago:
https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk-discovery.html
This is also usable in Maven 3.x.
I think that should cover your use case.
The enforcer check does not really need to be performed because the
toolch
Hi,
I am forwarding this message to Maven Developer List.
Before getting to any development, I'd like to know more about planned
Maven4 improvements in the area of toolchains.
Thank you.
Sincerely,
Mikko Koivunalho
On 02/02/2025 19:28, Tamás Cservenák wrote:
Howdy,
TBH, I never understoo
Howdy,
TBH, I never understood why toolchains are not ALWAYS used
with one (always) available toolchain, the Java that runs Maven
itself, so this would be your fallback.
Re enforcer, yes, probably we need new rules that would behave
as you describe.
Hence, yes, this would be a good direction.
O
Hi,
I work with many Maven projects which require building with different
JDKs: Java 8, Java 11, Java 17, and so on. I have all these installed
side by side in my build machine.
Maven Toolchains plugin is very helpful because it prevents me from
being forced to reconfigure environment variab