Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab Auto DevOps issue with Java 11

Tags:

java

maven

gitlab

I am trying to use Auto DevOps on GitLab to deploy my Java 11 Spring Boot Maven project to Kubernetes. I am getting the following error:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project ABC: Fatal error compiling: invalid target release: 11 -> [Help 1]

The project builds fine locally. Does anyone know how to fix this on GitLab?

like image 753
caffe_user Avatar asked Aug 21 '26 00:08

caffe_user


1 Answers

According to this changelog post on Hiroku's devcenter, you have to create a file 'system.properties' on your project, with this configuration in it:

java.runtime.version=11

During the next deployment, the build phase will use OpenJDK 11.

like image 105
lmz Avatar answered Aug 23 '26 14:08

lmz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!