From 579aac055dad073e11325a95828efe9f35ed2ff3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 4 Aug 2023 14:10:02 +0100 Subject: [PATCH] Upgrade to Maven Shade Plugin 3.5.0 Closes gh-36752 --- .../spring-boot-parent/build.gradle | 2 +- .../spring-boot-maven-plugin/build.gradle | 21 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-parent/build.gradle b/spring-boot-project/spring-boot-parent/build.gradle index 73fe311a14c..b1b751432ec 100644 --- a/spring-boot-project/spring-boot-parent/build.gradle +++ b/spring-boot-project/spring-boot-parent/build.gradle @@ -131,7 +131,7 @@ bom { ] } } - library("Maven Shade Plugin", "3.2.4") { + library("Maven Shade Plugin", "3.5.0") { group("org.apache.maven.plugins") { modules = [ "maven-shade-plugin" diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle index e659d84d314..e85537a99c0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle @@ -15,11 +15,6 @@ configurations { dependencies { compileOnly("org.apache.maven.plugin-tools:maven-plugin-annotations") compileOnly("org.sonatype.plexus:plexus-build-api") - compileOnly("org.apache.maven.shared:maven-common-artifact-filters") { - exclude(group: "javax.annotation", module: "javax.annotation-api") - exclude(group: "javax.enterprise", module: "cdi-api") - exclude(group: "javax.inject", module: "javax.inject") - } compileOnly("org.apache.maven:maven-core") { exclude(group: "javax.annotation", module: "javax.annotation-api") exclude(group: "javax.inject", module: "javax.inject") @@ -30,9 +25,14 @@ dependencies { exclude(group: "javax.inject", module: "javax.inject") } - implementation("org.springframework:spring-context") implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform")) implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools")) + implementation("org.apache.maven.shared:maven-common-artifact-filters") { + exclude(group: "javax.annotation", module: "javax.annotation-api") + exclude(group: "javax.enterprise", module: "cdi-api") + exclude(group: "javax.inject", module: "javax.inject") + } + implementation("org.springframework:spring-context") intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform")) intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools")) @@ -58,6 +58,15 @@ dependencies { runtimeOnly("org.sonatype.plexus:plexus-build-api") + testImplementation("org.apache.maven:maven-core") { + exclude(group: "javax.annotation", module: "javax.annotation-api") + exclude(group: "javax.inject", module: "javax.inject") + } + testImplementation("org.apache.maven.shared:maven-common-artifact-filters") { + exclude(group: "javax.annotation", module: "javax.annotation-api") + exclude(group: "javax.enterprise", module: "cdi-api") + exclude(group: "javax.inject", module: "javax.inject") + } testImplementation("org.assertj:assertj-core") testImplementation("org.junit.jupiter:junit-jupiter") testImplementation("org.mockito:mockito-core")