|
|
|
|
@ -64,7 +64,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -64,7 +64,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
}) |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-context") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-core") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-jcl") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/commons-logging") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/jakarta.servlet-api-6") |
|
|
|
|
.hasEntryWithName("BOOT-INF/classes/org/test/SampleApplication.class") |
|
|
|
|
.hasEntryWithName("org/springframework/boot/loader/launch/JarLauncher.class"); |
|
|
|
|
@ -195,7 +195,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -195,7 +195,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
assertThat(jar(repackaged)).hasEntryWithNameStartingWith("BOOT-INF/classes/") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-context") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-core") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-jcl") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/commons-logging") |
|
|
|
|
.doesNotHaveEntryWithName("BOOT-INF/lib/servlet-api-2.5.jar"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -210,7 +210,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -210,7 +210,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
assertThat(jar(repackaged)).hasEntryWithNameStartingWith("BOOT-INF/classes/") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-context") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-core") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-jcl") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/commons-logging") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/jakarta.servlet-api-"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -223,7 +223,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -223,7 +223,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/jakarta.servlet-api-") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/spring-context") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/spring-core") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/spring-jcl"); |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/commons-logging"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -238,7 +238,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -238,7 +238,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/jakarta.servlet-api-") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/spring-context") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/spring-core") |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/spring-jcl"); |
|
|
|
|
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/commons-logging"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -249,7 +249,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -249,7 +249,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
assertThat(jar(repackaged)).hasEntryWithNameStartingWith("BOOT-INF/classes/") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-context") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-core") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/spring-jcl") |
|
|
|
|
.hasEntryWithNameStartingWith("BOOT-INF/lib/commons-logging") |
|
|
|
|
.doesNotHaveEntryWithName("BOOT-INF/lib/log4j-api-2.4.1.jar"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -491,12 +491,11 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
@@ -491,12 +491,11 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
|
|
|
|
void whenJarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild) { |
|
|
|
|
mavenBuild.project("jar-output-timestamp").execute((project) -> { |
|
|
|
|
File repackaged = new File(project, "target/jar-output-timestamp-0.0.1.BUILD-SNAPSHOT.jar"); |
|
|
|
|
List<String> sortedLibs = Arrays.asList("BOOT-INF/lib/jakarta.servlet-api", "BOOT-INF/lib/jspecify", |
|
|
|
|
"BOOT-INF/lib/micrometer-commons", "BOOT-INF/lib/micrometer-observation", "BOOT-INF/lib/spring-aop", |
|
|
|
|
"BOOT-INF/lib/spring-beans", |
|
|
|
|
List<String> sortedLibs = Arrays.asList("BOOT-INF/lib/commons-logging", "BOOT-INF/lib/jakarta.servlet-api", |
|
|
|
|
"BOOT-INF/lib/jspecify", "BOOT-INF/lib/micrometer-commons", "BOOT-INF/lib/micrometer-observation", |
|
|
|
|
"BOOT-INF/lib/spring-aop", "BOOT-INF/lib/spring-beans", |
|
|
|
|
"BOOT-INF/lib/" + JarModeLibrary.TOOLS.getCoordinates().getArtifactId(), |
|
|
|
|
"BOOT-INF/lib/spring-context", "BOOT-INF/lib/spring-core", "BOOT-INF/lib/spring-expression", |
|
|
|
|
"BOOT-INF/lib/spring-jcl"); |
|
|
|
|
"BOOT-INF/lib/spring-context", "BOOT-INF/lib/spring-core", "BOOT-INF/lib/spring-expression"); |
|
|
|
|
assertThat(jar(repackaged)).entryNamesInPath("BOOT-INF/lib/") |
|
|
|
|
.zipSatisfy(sortedLibs, |
|
|
|
|
(String jarLib, String expectedLib) -> assertThat(jarLib).startsWith(expectedLib)); |
|
|
|
|
|