Create a new layer for loader classes

Create a dedicated layer that is used to hold the launcher support
classes. The layer sits between `dependencies` and
`snapshot-dependencies` so that the layer is sensible for both
SNAPSHOT and RELEASE versions of Spring Boot

Closes gh-20529
This commit is contained in:
Phillip Webb
2020-04-02 23:55:52 -07:00
parent 7bc7d86ad4
commit 3f806aa513
4 changed files with 14 additions and 3 deletions

View File

@@ -100,7 +100,7 @@ class BootJarTests extends AbstractBootArchiveTests<TestBootJar> {
@Test
void whenJarIsLayeredThenLayersIndexIsPresentAndListsLayersInOrder() throws IOException {
try (JarFile jarFile = new JarFile(createLayeredJar())) {
assertThat(entryLines(jarFile, "BOOT-INF/layers.idx")).containsExactly("dependencies",
assertThat(entryLines(jarFile, "BOOT-INF/layers.idx")).containsExactly("dependencies", "spring-boot-loader",
"snapshot-dependencies", "application");
}
}