Update CNB buildpack Java version env variable
Prior to this commit, the build tool plugins set the environment variable BP_JAVA_VERSION when invoking the CNB builder to set the version of the JDK/JRE that the builder should use in the created image. With CNB API 0.3, the convention changed the name of this environment variable to BP_JVM_VERSION. This commit updates the build tool plugins to match the newer convention. See gh-21273
This commit is contained in:
@@ -102,7 +102,7 @@ This configuration will use a builder image with the name `mine/java-cnb-builder
|
||||
==== Builder Configuration
|
||||
If the builder exposes configuration options, those can be set using the `environment` property.
|
||||
|
||||
The following example assumes that the default builder defines a `BP_JAVA_VERSION` property (typically used to customize the JDK version the image should use):
|
||||
The following example assumes that the default builder defines a `BP_JVM_VERSION` property (typically used to customize the JDK version the image should use):
|
||||
|
||||
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
|
||||
.Groovy
|
||||
|
||||
@@ -9,6 +9,6 @@ bootJar {
|
||||
|
||||
// tag::env[]
|
||||
bootBuildImage {
|
||||
environment = ["BP_JAVA_VERSION" : "13.0.1"]
|
||||
environment = ["BP_JVM_VERSION" : "13.0.1"]
|
||||
}
|
||||
// end::env[]
|
||||
|
||||
@@ -11,6 +11,6 @@ tasks.getByName<BootJar>("bootJar") {
|
||||
|
||||
// tag::env[]
|
||||
tasks.getByName<BootBuildImage>("bootBuildImage") {
|
||||
environment = ["BP_JAVA_VERSION" : "13.0.1"]
|
||||
environment = ["BP_JVM_VERSION" : "13.0.1"]
|
||||
}
|
||||
// end::env[]
|
||||
|
||||
Reference in New Issue
Block a user