Skip to content

Commit 9473e69

Browse files
committed
Use Java 24 for native image system test
Upgrade to Java 24 for the native image system test to ensure that the new rachability JSON is used. See gh-45501
1 parent 3ec75c3 commit 9473e69

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

spring-boot-system-tests/spring-boot-image-tests/src/systemTest/java/org/springframework/boot/image/paketo/PaketoBuilderTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ void nativeApp() throws Exception {
309309
this.gradleBuild
310310
.expectDeprecationMessages("has been deprecated. This is scheduled to be removed in Gradle 9.0");
311311
this.gradleBuild.expectDeprecationMessages("upgrading_version_8.html#deprecated_access_to_convention");
312+
// these deprecations are from native image buildpacks
313+
this.gradleBuild.expectDeprecationMessages("Using a deprecated option --report-unsupported-elements-at-runtime",
314+
"The option is deprecated and will be removed in the future.");
312315
writeMainClass();
313316
String imageName = "paketo-integration/" + this.gradleBuild.getProjectDir().getName();
314317
ImageReference imageReference = ImageReference.of(ImageName.of(imageName));

spring-boot-system-tests/spring-boot-image-tests/src/systemTest/resources/org/springframework/boot/image/paketo/PaketoBuilderTests-nativeApp.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ repositories {
2121
spring.mavenRepositories()
2222
}
2323

24+
tasks.named("bootBuildImage") {
25+
environment["BP_JVM_VERSION"] = "24"
26+
}
27+
2428
dependencies {
2529
implementation("org.springframework.boot:spring-boot-starter-web:{bootVersion}")
2630
}

0 commit comments

Comments
 (0)