mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Switch Maven plugin to exclude optional dependencies by default
Closes gh-47318
This commit is contained in:
+2
-2
@@ -181,14 +181,14 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void whenAnEntryIsOptionalByDefaultAppearsInTheRepackagedJar(MavenBuild mavenBuild) {
|
||||
void whenAnEntryIsOptionalByDefaultDoesNotAppearInTheRepackagedJar(MavenBuild mavenBuild) {
|
||||
mavenBuild.project("jar-optional-default").goals("install").execute((project) -> {
|
||||
File repackaged = new File(project, "target/jar-optional-default-0.0.1.BUILD-SNAPSHOT.jar");
|
||||
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/log4j-api-");
|
||||
.doesNotHaveEntryWithNameStartingWith("BOOT-INF/lib/log4j-api-");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -124,8 +124,8 @@ public abstract class AbstractPackagerMojo extends AbstractDependencyFilterMojo
|
||||
* Include JAR tools.
|
||||
* @since 3.3.0
|
||||
*/
|
||||
@Parameter(defaultValue = "true")
|
||||
public boolean includeTools = true;
|
||||
@Parameter(defaultValue = "false")
|
||||
public boolean includeTools;
|
||||
|
||||
/**
|
||||
* Layer configuration with options to disable layer creation, exclude layer tools
|
||||
|
||||
Reference in New Issue
Block a user