Spring boot gradle plugin task bootBuildImage failed today with the follow error:

Error log:

[creator]       no valid dependencies for jdk, 15.*, and io.buildpacks.stacks.bionic in [(jdk, 8.0.292, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3]) 
(jre, 8.0.292, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3]) (jdk, 11.0.11, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3]) (jre, 11.0.11, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3]) (jdk, 16.0.1, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3]) (jre, 16.0.1, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3]) (jvmkill, 1.16.0, [io.buildpacks.stacks.bionic org.cloudfoundry.stacks.cflinuxfs3])]

We are using java 15. Spring Boot version: 2.4.4

This issue is related to https://buildpacks.io/. A bit research leads to finding that buildpacks bumped their major version to 8.x and removed java 15 support https://github.com/paketo-buildpacks/bellsoft-liberica/pull/99

My guess is that the spring boot gradle plugin didn't pin the version of "buildpacks" used.

Comment From: andrej-urvantsev

I'm having the same problem.

From one side I understand that java 15 is EOL, from another side there are spring projects(issue is closed but new version isn't released) which can't run on on java 16 yet.

Comment From: andrej-urvantsev

My guess is that the spring boot gradle plugin didn't pin the version of "buildpacks" used.

Pinning version is controversial: build will be stable, but java versions will be outdated(not running on latest minor version) . However, might be it's possible to set specific java version?

Comment From: scottfrederick

My guess is that the spring boot gradle plugin didn't pin the version of "buildpacks" used.

The Spring Boot build plugins default to the Paketo builder with the tag paketobuildpacks/builder:base. This does allow the versions of buildpacks being used by the builder to float.

However, might be it's possible to set specific java version?

If you need a version of the Paketo builder with specific buildpack versions included, you can override the default builder with a versioned builder such as paketobuildpacks/builder:0.1.99-base (which includes paketo-buildpacks/bellsoft-liberica@7.1.0) to pin the buildpack versions yourself. Any further customization of buildpack behavior, such as Java versions installed, depends on the buildpack implementation not on Spring Boot.

If you have any further questions regarding Paketo builder and buildpacks, you can follow up with the Paketo team on the Paketo Buildpacks Slack. If you have further questions regarding Spring Boot, please follow up on Stack Overflow or Gitter.