Skip to content

Commit 005ed8b

Browse files
Use Java version wildcard in image building docs
Fixes gh-22916
1 parent c59b48b commit 005ed8b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/asciidoc/packaging-oci-image.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ $ gradle bootBuildImage --builder=mine/java-cnb-builder --runImage=mine/java-cnb
115115
==== Builder Configuration
116116
If the builder exposes configuration options, those can be set using the `environment` property.
117117

118-
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):
118+
The following example assumes that the default builder recognizes a `BP_JVM_VERSION` property.
119+
This property is typically used to customize the JDK version the image should use by specifying the major version and a wildcard for the rest of the version:
119120

120121
[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
121122
.Groovy

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/packaging/boot-build-image-env.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ bootJar {
99

1010
// tag::env[]
1111
bootBuildImage {
12-
environment = ["BP_JVM_VERSION" : "13.0.1"]
12+
environment = ["BP_JVM_VERSION" : "8.*"]
1313
}
1414
// end::env[]
1515

1616
task bootBuildImageEnvironment {
1717
doFirst {
18-
bootBuildImage.environment.each { name, value -> println "$name=$value" }
18+
bootBuildImage.environment.each { name, value -> println "$name=$value" }
1919
}
2020
}

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/packaging/boot-build-image-env.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77

88
// tag::env[]
99
tasks.getByName<BootBuildImage>("bootBuildImage") {
10-
environment = mapOf("BP_JVM_VERSION" to "13.0.1")
10+
environment = mapOf("BP_JVM_VERSION" to "8.*")
1111
}
1212
// end::env[]
1313

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/packaging-oci-image.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ The builder and run image can be specified on the command line as well, as shown
152152
==== Builder Configuration
153153
If the builder exposes configuration options using environment variables, those can be set using the `env` attributes.
154154

155-
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):
155+
The following example assumes that the default builder recognizes a `BP_JVM_VERSION` property.
156+
This property is typically used to customize the JDK version the image should use by specifying the major version and a wildcard for the rest of the version:
156157

157158
[source,xml,indent=0,subs="verbatim,attributes"]
158159
----
@@ -166,7 +167,7 @@ The following example assumes that the default builder defines a `BP_JVM_VERSION
166167
<configuration>
167168
<image>
168169
<env>
169-
<BP_JVM_VERSION>13.0.1</BP_JVM_VERSION>
170+
<BP_JVM_VERSION>8.*</BP_JVM_VERSION>
170171
</env>
171172
</image>
172173
</configuration>

0 commit comments

Comments
 (0)