You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the issue:
When I run ./gradlew -Pprod bootJar jib I get the following error:
Your project is using Java 17 but the base image is for Java 11, perhaps you should configure a Java 17-compatible base image using the 'jib.from.image' parameter, or set targetCompatibility = 11 or below in your build configuration
Expected behavior:
The image should build with Java 17.
Steps to reproduce:
Create a Spring project with Java 17 and Gradle
Configure just the jib.to.image (without custom jib.from.image).
Run ./gradlew bootJar jib
jib-gradle-plugin Configuration:
jib {
to {
image ='<accountId>.dkr.<region>.amazonaws.com/<name>'
credHelper ='ecr-login'
}
}
Log output:
...
> Task :compileJava
Note: Hibernate JPA 2 Static-Metamodel Generator 5.6.4.Final
> Task :jib FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jib'.
> Your project is using Java 17 but the base image is for Java 11, perhaps you should configure a Java 17-compatible base image using the 'jib.from.image' parameter, or set targetCompatibility = 11 or below in your build configuration
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.1/userguide/command_line_interface.html#sec:command_line_warnings
Additional Information:
I'm using the default JHipster setup and trying to push to AWS ECR. Based on the #3483 I assume I shouldn't make any more configurations. I guess I can workaround by providing custom jib.from.image.
The text was updated successfully, but these errors were encountered:
Yep, in order to use Java 17 and not 11 I just changed the target Java version to 17 and it started the app. I totally missed the docker.gradle config. Thank you and apologies for wasting your time. This solves my issue.
Environment:
Description of the issue:
When I run
./gradlew -Pprod bootJar jib
I get the following error:Your project is using Java 17 but the base image is for Java 11, perhaps you should configure a Java 17-compatible base image using the 'jib.from.image' parameter, or set targetCompatibility = 11 or below in your build configuration
Expected behavior:
The image should build with Java 17.
Steps to reproduce:
jib.to.image
(without customjib.from.image
)../gradlew bootJar jib
jib-gradle-plugin
Configuration:Log output:
Additional Information:
I'm using the default JHipster setup and trying to push to AWS ECR. Based on the #3483 I assume I shouldn't make any more configurations. I guess I can workaround by providing custom
jib.from.image
.The text was updated successfully, but these errors were encountered: