Relocate launcher classes

Create alternative launcher classes under the package
`org.springframework.boot.loader.launch` and use them in favor
of the previous location.

This update is designed to improve compatibility with future
changes in the loader.

Closes gh-37667
This commit is contained in:
Phillip Webb
2023-09-18 12:39:28 -07:00
parent f947bad3f7
commit c22548982a
33 changed files with 183 additions and 54 deletions

View File

@@ -93,9 +93,10 @@ class PaketoBuilderTests {
.contains("paketo-buildpacks/ca-certificates", "paketo-buildpacks/bellsoft-liberica",
"paketo-buildpacks/executable-jar", "paketo-buildpacks/dist-zip",
"paketo-buildpacks/spring-boot");
metadata.processOfType("web").containsExactly("java", "org.springframework.boot.loader.JarLauncher");
metadata.processOfType("web")
.containsExactly("java", "org.springframework.boot.loader.launch.launch.JarLauncher");
metadata.processOfType("executable-jar")
.containsExactly("java", "org.springframework.boot.loader.JarLauncher");
.containsExactly("java", "org.springframework.boot.loader.launch.launch.JarLauncher");
});
assertImageHasJvmSbomLayer(imageReference, config);
assertImageHasDependenciesSbomLayer(imageReference, config, "executable-jar");
@@ -238,9 +239,10 @@ class PaketoBuilderTests {
.contains("paketo-buildpacks/ca-certificates", "paketo-buildpacks/bellsoft-liberica",
"paketo-buildpacks/executable-jar", "paketo-buildpacks/dist-zip",
"paketo-buildpacks/spring-boot");
metadata.processOfType("web").containsExactly("java", "org.springframework.boot.loader.WarLauncher");
metadata.processOfType("web")
.containsExactly("java", "org.springframework.boot.loader.launch.WarLauncher");
metadata.processOfType("executable-jar")
.containsExactly("java", "org.springframework.boot.loader.WarLauncher");
.containsExactly("java", "org.springframework.boot.loader.launch.WarLauncher");
});
assertImageHasJvmSbomLayer(imageReference, config);
assertImageHasDependenciesSbomLayer(imageReference, config, "executable-jar");