javaToolchains {
// Define a toolchain for Java 11
register("jdk11") {
languageVersion.set(JavaLanguageVersion.of(11))
}
// Define a toolchain for Java 17
register("jdk17") {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
this code does not work. as register is not valid…
Vampire
(Björn Kautler)
May 19, 2023, 1:05pm
2
What do you want to achieve here?
You cannot “register” a toolchain.
I want my build system to have its own jdk irrespective of classpath jdk found or not…
I think that is what the purpose of toolchains as at
https://maven.apache.org/guides/mini/guide-using-toolchains.html
Vampire
(Björn Kautler)
May 26, 2023, 9:12am
4
I’m not sure why you link a Maven docs page here.
But anyway, you declare what properties of the toolchain you need as documented in the link you posted in your other thread.
You cannot register an own one.
1 Like