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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With