diff --git a/spring-boot-project/spring-boot-parent/build.gradle b/spring-boot-project/spring-boot-parent/build.gradle index 6f7e898253..f8b93f5125 100644 --- a/spring-boot-project/spring-boot-parent/build.gradle +++ b/spring-boot-project/spring-boot-parent/build.gradle @@ -87,12 +87,13 @@ bom { ] } } - library("Maven", "3.6.3") { + library("Maven", "3.9.4") { group("org.apache.maven") { modules = [ + "maven-core", + "maven-model-builder", "maven-plugin-api", - "maven-resolver-provider", - "maven-settings-builder" + "maven-resolver-provider" ] } } 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 c1cec420e5..35a2590aad 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 @@ -16,10 +16,12 @@ 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-plugin-api") { + exclude(group: "javax.annotation", module: "javax.annotation-api") exclude(group: "javax.enterprise", module: "cdi-api") exclude(group: "javax.inject", module: "javax.inject") } @@ -40,6 +42,7 @@ dependencies { intTestImplementation("org.testcontainers:junit-jupiter") mavenOptionalImplementation("org.apache.maven.plugins:maven-shade-plugin") { + exclude(group: "javax.annotation", module: "javax.annotation-api") exclude(group: "javax.enterprise", module: "cdi-api") exclude(group: "javax.inject", module: "javax.inject") } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ProcessTestAotMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ProcessTestAotMojo.java index a1b93ac3c2..9729c92bc5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ProcessTestAotMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ProcessTestAotMojo.java @@ -30,7 +30,6 @@ import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; import org.apache.maven.artifact.handler.DefaultArtifactHandler; -import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.ArtifactResolutionRequest; import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ResolutionErrorHandler; @@ -101,14 +100,16 @@ public class ProcessTestAotMojo extends AbstractAotMojo { /** * Local artifact repository used to resolve JUnit platform launcher jars. */ + @SuppressWarnings("deprecation") @Parameter(defaultValue = "${localRepository}", required = true, readonly = true) - private ArtifactRepository localRepository; + private org.apache.maven.artifact.repository.ArtifactRepository localRepository; /** * Remote artifact repositories used to resolve JUnit platform launcher jars. */ + @SuppressWarnings("deprecation") @Parameter(defaultValue = "${project.remoteArtifactRepositories}", required = true, readonly = true) - private List remoteRepositories; + private List remoteRepositories; @Component private RepositorySystem repositorySystem;