GoogleContainerTools / jib

🏗 Build container images for your Java applications.
Apache License 2.0
13.6k stars 1.43k forks source link

Automatically select correct base image for Java 21 #4137

Closed leonardehrenfried closed 5 months ago

leonardehrenfried commented 10 months ago

Environment:

Description of the issue:

Jib automatically selects the correct base image for Java 8,11 and 17 but not 21.

Expected behavior:

Jib should automatically select eclipse-temurin:21-jre when Java 21 is detected.

Steps to reproduce:

  1. Switch maven-compiler-plugin to use Java 21
  2. Run a build with Jib
  3. See error message "Your project is using Java 21 but the base image is for Java 17, perhaps you should configure a Java 21-compatible base image using the '' parameter, or set maven-compiler-plugin's '' or '' version to 17 or below in your build configuration: IncompatibleBaseImageJavaVersionException"

Log output: https://github.com/opentripplanner/OpenTripPlanner/actions/runs/6809930157/job/18517607512

Marx2 commented 8 months ago

PR is ready and waiting for a month now. Any chance to merge it? Without this change support for java 21 cannot be solved in https://github.com/MathieuSoysal/jib-container-publish.yml