diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc index 728a3220ff7..c123ba9e819 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc @@ -83,6 +83,10 @@ Acceptable values are `ALWAYS`, `NEVER`, and `IF_NOT_PRESENT`. | `false` |=== +NOTE: The plugin detects the target Java compatibility of the project using the JavaPlugin's `targetCompatibility` property. +By default, the plugin instructs the buildpacks to install the same Java version. +You can override this behaviour by setting the `BP_JVM_VERSION` environment variable, see <>. + [[build-image-examples]] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc index 7c0b656f9c0..e7ef56071c7 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc @@ -107,7 +107,11 @@ Acceptable values are `ALWAYS`, `NEVER`, and `IF_NOT_PRESENT`. | `false` |=== -For more details, see <>. +NOTE: The plugin detects the target Java compatibility of the project using the compiler's plugin configuration or the `maven.compiler.target` property. +By default, the plugin instructs the buildpacks to install the same Java version. +You can override this behaviour by setting the `BP_JVM_VERSION` environment variable, see <>. + +For more details, see also <>. include::goals/build-image.adoc[leveloffset=+1]