Use YAML compatible classpath.idx format

Update the `classpath.idx` format to align with `layers.idx` and allow
third-parties can parse it as YAML

Closes gh-20861
This commit is contained in:
Phillip Webb
2020-04-06 16:09:57 -07:00
parent 65672a1150
commit df58b9baa2
7 changed files with 36 additions and 22 deletions

View File

@@ -68,9 +68,9 @@ public abstract class AbstractExecutableArchiveLauncherTests {
JarEntry indexEntry = new JarEntry(entryPrefix + "/classpath.idx");
jarOutputStream.putNextEntry(indexEntry);
Writer writer = new OutputStreamWriter(jarOutputStream, StandardCharsets.UTF_8);
writer.write("BOOT-INF/lib/foo.jar\n");
writer.write("BOOT-INF/lib/bar.jar\n");
writer.write("BOOT-INF/lib/baz.jar\n");
writer.write("- \"BOOT-INF/lib/foo.jar\"\n");
writer.write("- \"BOOT-INF/lib/bar.jar\"\n");
writer.write("- \"BOOT-INF/lib/baz.jar\"\n");
writer.flush();
}
addNestedJars(entryPrefix, "/lib/foo.jar", jarOutputStream);

View File

@@ -1,5 +1,5 @@
a.jar
b.jar
c.jar
d.jar
e.jar
- "a.jar"
- "b.jar"
- "c.jar"
- "d.jar"
- "e.jar"