|
|
@ -233,12 +233,13 @@ class PropertiesLauncherTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
void testUserSpecifiedNestedJarPath() throws Exception {
|
|
|
|
void testUserSpecifiedNestedJarPath() throws Exception {
|
|
|
|
System.setProperty("loader.path", "nested-jars/app.jar!/foo.jar");
|
|
|
|
System.setProperty("loader.path", "nested-jars/nested-jar-app.jar!/BOOT-INF/classes/");
|
|
|
|
System.setProperty("loader.main", "demo.Application");
|
|
|
|
System.setProperty("loader.main", "demo.Application");
|
|
|
|
this.launcher = new PropertiesLauncher();
|
|
|
|
this.launcher = new PropertiesLauncher();
|
|
|
|
List<Archive> archives = new ArrayList<>();
|
|
|
|
assertThat(ReflectionTestUtils.getField(this.launcher, "paths").toString())
|
|
|
|
this.launcher.getClassPathArchivesIterator().forEachRemaining(archives::add);
|
|
|
|
.isEqualTo("[nested-jars/nested-jar-app.jar!/BOOT-INF/classes/]");
|
|
|
|
assertThat(archives).hasSize(1).areExactly(1, endingWith("foo.jar!/"));
|
|
|
|
this.launcher.launch(new String[0]);
|
|
|
|
|
|
|
|
waitFor("Hello World");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|