Combine application and resources layers into a single layer

Closes gh-20562
This commit is contained in:
Madhura Bhave
2020-03-23 12:59:42 -07:00
parent 952e529787
commit a06f4f21e3
9 changed files with 17 additions and 65 deletions

View File

@@ -81,7 +81,7 @@ class BootJarIntegrationTests extends AbstractBootArchiveIntegrationTests {
assertThat(jarFile.getEntry("BOOT-INF/layers/snapshot-dependencies/lib/commons-io-2.7-SNAPSHOT.jar"))
.isNotNull();
assertThat(jarFile.getEntry("BOOT-INF/layers/application/classes/example/Main.class")).isNotNull();
assertThat(jarFile.getEntry("BOOT-INF/layers/resources/classes/static/file.txt")).isNotNull();
assertThat(jarFile.getEntry("BOOT-INF/layers/application/classes/static/file.txt")).isNotNull();
}
}

View File

@@ -103,7 +103,7 @@ class BootJarTests extends AbstractBootArchiveTests<BootJar> {
void whenJarIsLayeredThenLayersIndexIsPresentAndListsLayersInOrder() throws IOException {
try (JarFile jarFile = new JarFile(createLayeredJar())) {
assertThat(entryLines(jarFile, "BOOT-INF/layers.idx")).containsExactly("dependencies",
"snapshot-dependencies", "resources", "application");
"snapshot-dependencies", "application");
}
}
@@ -116,7 +116,7 @@ class BootJarTests extends AbstractBootArchiveTests<BootJar> {
.contains("BOOT-INF/layers/snapshot-dependencies/lib/third-library-SNAPSHOT.jar")
.containsSubsequence("BOOT-INF/layers/application/classes/com/example/Application.class",
"BOOT-INF/layers/application/classes/application.properties")
.contains("BOOT-INF/layers/resources/classes/static/test.css");
.contains("BOOT-INF/layers/application/classes/static/test.css");
}
@Test