use of org.springframework.boot.loader.archive.ExplodedArchive in project spring-boot by spring-projects.
the class JarLauncherTests method explodedJarHasOnlyBootInfClassesAndContentsOfBootInfLibOnClasspath.
@Test
public void explodedJarHasOnlyBootInfClassesAndContentsOfBootInfLibOnClasspath() throws Exception {
File explodedRoot = explode(createJarArchive("archive.jar", "BOOT-INF"));
JarLauncher launcher = new JarLauncher(new ExplodedArchive(explodedRoot, true));
List<Archive> archives = launcher.getClassPathArchives();
assertThat(archives).hasSize(2);
assertThat(getUrls(archives)).containsOnly(new File(explodedRoot, "BOOT-INF/classes").toURI().toURL(), new URL("jar:" + new File(explodedRoot, "BOOT-INF/lib/foo.jar").toURI().toURL() + "!/"));
}
Aggregations