Closed chhch closed 1 year ago
I forked the reproduction into our renovate-reproductions
organization:
Please provide the debug logs from the branch prior to that docker run command
Relevant log:
DEBUG: Resolved stable matching version(branch="renovate/com.diffplug.spotless-6.x")
{
"toolName": "java",
"constraint": "^16.0.0",
"resolvedVersion": "16.0.2+7"
}
can be overwritten by using renovate constraints
config option.
can be overwritten by using renovate
constraints
config option.
{
"constraints": {
"java": "^17.0.0"
}
}
Is there any way which Renovate could detect Java 17 from this project?
Is there any way which Renovate could detect Java 17 from this project?
As a Java Dev, I can say no. The only thing that tells me this project requires Java 17 is Spring Boot 3 because it requires 17, but it's not really programmatically checkable as far as I'm aware.
The user might consider using one of the 3 options to enforce Java version constraints in Gradle: https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
Is there any way which Renovate could detect Java 17 from this project?
If I'm not mistaken the currently implemented java constraints check is based on gradle's compatibility matrix that highlights Java 16 as the minimum for gradle 7.0. Java 16 is no LTS release and hasn't seen updates in a very long time.
My suggestion would be to add a constraint for '^17.0.0'
(LTS) in case gradle >= 7.3 is used. I can't really think of any drawbacks right now.
Is there any way which Renovate could detect Java 17 from this project?
If I'm not mistaken the currently implemented java constraints check is based on gradle's compatibility matrix that highlights Java 16 as the minimum for gradle 7.0. Java 16 is no LTS release and hasn't seen updates in a very long time.
My suggestion would be to add a constraint for
'^17.0.0'
(LTS) in case gradle >= 7.3 is used. I can't really think of any drawbacks right now.
I have to agree Java 16 is EOL.
Sounds good, let's consider this closed once Java 17 is selected as default for Gradle 7.3+
Many thanks, everything is working fine now :slightly_smiling_face:
Java 16 as the minimum for gradle 7.0
That page says "A Java version between 8 and 19 is required to execute Gradle." It then says that Gradle 7 is the first Gradle release that can run on Java 16. But you can still run Gradle 7 on Java 8.
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us what version of Renovate you run.
No response
If you're self-hosting Renovate, select which platform you are using.
None
If you're self-hosting Renovate, tell us what version of the platform you run.
No response
Was this something which used to work for you, and then stopped?
I never saw this working
Describe the bug
Once
org.springframework.boot
(version > 3) is included in the project, the dependencies ofgradle.build
can no longer be updated, see minimal reproductions. Furthermore, renovate cannot update fromid 'org.springframework.boot' version '3.0.0'
toid 'org.springframework.boot' version '3.0.2'
.This is probably because the sidecar container starts with Java 16.0.2+7:
docker.io/renovate/sidecar bash -l -c "install-tool java 16.0.2+7 && ./gradlew --console=plain -q properties"
Relevant debug logs
Logs
``` Command failed: docker run --rm --name=renovate_sidecar --label=renovate_child -v "/mnt/renovate/gh/chhch/renovate-java-17-dependency-example":"/mnt/renovate/gh/chhch/renovate-java-17-dependency-example" -v "/tmp/renovate-cache":"/tmp/renovate-cache" -v "/tmp/containerbase":"/tmp/containerbase" -e GRADLE_OPTS -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/mnt/renovate/gh/chhch/renovate-java-17-dependency-example" docker.io/renovate/sidecar bash -l -c "install-tool java 16.0.2+7 && ./gradlew --console=plain -q properties" openjdk version "16.0.2" 2021-07-20 OpenJDK Runtime Environment Temurin-16.0.2+7 (build 16.0.2+7) OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, sharing) FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'renovate-java-17-dependency-example'. > Could not resolve all files for configuration ':classpath'. > Did not resolve 'org.apache.httpcomponents:httpclient:4.5.14' which is part of the dependency lock state > Did not resolve 'org.springframework.boot:spring-boot-gradle-plugin:3.0.2' which is part of the dependency lock state > Did not resolve 'io.spring.gradle:dependency-management-plugin:1.1.0' which is part of the dependency lock state > Did not resolve 'net.java.dev.jna:jna:5.7.0' which is part of the dependency lock state > Did not resolve 'org.springframework:spring-jcl:6.0.4' which is part of the dependency lock state > Did not resolve 'com.google.code.findbugs:jsr305:3.0.2' which is part of the dependency lock state > Did not resolve 'com.fasterxml.jackson:jackson-bom:2.14.1' which is part of the dependency lock state > Did not resolve 'org.springframework.boot:spring-boot-buildpack-platform:3.0.2' which is part of the dependency lock state > Did not resolve 'net.java.dev.jna:jna-platform:5.7.0' which is part of the dependency lock state > Did not resolve 'com.fasterxml.jackson.core:jackson-databind:2.14.1' which is part of the dependency lock state > Did not resolve 'org.springframework:spring-core:6.0.4' which is part of the dependency lock state > Did not resolve 'com.fasterxml.jackson.core:jackson-annotations:2.14.1' which is part of the dependency lock state > Did not resolve 'org.tomlj:tomlj:1.0.0' which is part of the dependency lock state > Did not resolve 'org.apache.commons:commons-compress:1.21' which is part of the dependency lock state > Did not resolve 'org.springframework.boot:spring-boot-loader-tools:3.0.2' which is part of the dependency lock state > Did not resolve 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.1' which is part of the dependency lock state > Did not resolve 'org.apache.httpcomponents:httpcore:4.4.16' which is part of the dependency lock state > Did not resolve 'commons-codec:commons-codec:1.11' which is part of the dependency lock state > Did not resolve 'org.antlr:antlr4-runtime:4.7.2' which is part of the dependency lock state > Did not resolve 'com.fasterxml.jackson.core:jackson-core:2.14.1' which is part of the dependency lock state > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.2. Required by: project : > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.2 was found. The consumer was configured to find a library for use during runtime, compatible with Java 16, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.1' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 16) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.2 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.2 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 16) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.2. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.2 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.2 was found. The consumer was configured to find a library for use during runtime, compatible with Java 16, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.1' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 16) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.2 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.2 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 16 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.2 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 16) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.0.1') * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 48s ```Have you created a minimal reproduction repository?
I have linked to a minimal reproduction repository in the bug description