Merge branch '3.3.x'
Closes gh-43270
This commit is contained in:
@@ -348,8 +348,11 @@ class BootZipCopyAction implements CopyAction {
|
||||
|
||||
private void writeJarModeLibrary(String location, JarModeLibrary library) throws IOException {
|
||||
String name = location + library.getName();
|
||||
writeEntry(name, ZipEntryContentWriter.fromInputStream(library.openStream()), false,
|
||||
(entry) -> prepareStoredEntry(library.openStream(), entry));
|
||||
writeEntry(name, ZipEntryContentWriter.fromInputStream(library.openStream()), false, (entry) -> {
|
||||
try (InputStream in = library.openStream()) {
|
||||
prepareStoredEntry(library.openStream(), entry);
|
||||
}
|
||||
});
|
||||
if (BootZipCopyAction.this.layerResolver != null) {
|
||||
Layer layer = BootZipCopyAction.this.layerResolver.getLayer(library);
|
||||
this.layerIndex.add(layer, name);
|
||||
|
||||
@@ -122,9 +122,10 @@ class NativeImagePluginActionIntegrationTests {
|
||||
BuildResult result = this.gradleBuild.build("bootJar");
|
||||
assertThat(result.task(":bootJar").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
File buildLibs = new File(this.gradleBuild.getProjectDir(), "build/libs");
|
||||
JarFile jarFile = new JarFile(new File(buildLibs, this.gradleBuild.getProjectDir().getName() + ".jar"));
|
||||
Manifest manifest = jarFile.getManifest();
|
||||
assertThat(manifest.getMainAttributes().getValue("Spring-Boot-Native-Processed")).isEqualTo("true");
|
||||
try (JarFile jarFile = new JarFile(new File(buildLibs, this.gradleBuild.getProjectDir().getName() + ".jar"))) {
|
||||
Manifest manifest = jarFile.getManifest();
|
||||
assertThat(manifest.getMainAttributes().getValue("Spring-Boot-Native-Processed")).isEqualTo("true");
|
||||
}
|
||||
}
|
||||
|
||||
private String projectPath(String path) {
|
||||
|
||||
Reference in New Issue
Block a user