The https://github.com/spring-projects/spring-framework/issues/35007 requested to disable gradle auto provisioning so that the build uses the JDKs installed in the environment. The change was rolled back in https://github.com/spring-projects/spring-framework/issues/35041.
Would it be possible to disable vendor hardcoding in https://github.com/spring-projects/spring-framework/blob/75c4bc8947e8ad971a3a8026304ad047aa165cab/buildSrc/src/main/java/org/springframework/build/JavaConventions.java#L89 so that the build does not download Bellsoft JDK if another suitable JDK is already installed?
Comment From: bclozel
We're trying to fix some build issues. The vendor is not fixed on the main branch. Does that work for you?
Comment From: vpa1977
We're trying to fix some build issues. The vendor is not fixed on the main branch. Does that work for you?
Hi, thank you for the fast reply!!!
I believe main
has the same toolchain constraint code: https://github.com/spring-projects/spring-framework/blob/75c4bc8947e8ad971a3a8026304ad047aa165cab/buildSrc/src/main/java/org/springframework/build/JavaConventions.java#L89
The error from running gradle build
in main:
* What went wrong:
A problem occurred configuring root project 'spring'.
> Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
> Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=24, vendor=BellSoft Liberica, implementation=vendor-specific} for LINUX on x86_64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
* Try:
> Learn more about toolchain auto-detection at https://docs.gradle.org/8.12.1/userguide/toolchains.html#sec:auto_detection.
> Learn more about toolchain repositories at https://docs.gradle.org/8.12.1/userguide/toolchains.html#sub:download_repositories.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
Comment From: vpa1977
Thank you!!!!!!