Upgrade to Maven 3.9.4

Closes gh-36705
This commit is contained in:
Andy Wilkinson 2023-08-03 14:55:32 +01:00
parent a709625c24
commit 59bd6879a2
3 changed files with 9 additions and 3 deletions

View File

@ -32,6 +32,7 @@ import org.apache.maven.model.ActivationProperty;
import org.apache.maven.model.building.ModelProblemCollector;
import org.apache.maven.model.building.ModelProblemCollectorRequest;
import org.apache.maven.model.path.DefaultPathTranslator;
import org.apache.maven.model.path.ProfileActivationFilePathInterpolator;
import org.apache.maven.model.profile.DefaultProfileSelector;
import org.apache.maven.model.profile.ProfileActivationContext;
import org.apache.maven.model.profile.activation.FileProfileActivator;
@ -173,8 +174,10 @@ public class MavenSettings {
private DefaultProfileSelector createProfileSelector() {
DefaultProfileSelector selector = new DefaultProfileSelector();
selector.addProfileActivator(new FileProfileActivator().setPathTranslator(new DefaultPathTranslator()));
ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator = new ProfileActivationFilePathInterpolator();
profileActivationFilePathInterpolator.setPathTranslator(new DefaultPathTranslator());
selector.addProfileActivator(new FileProfileActivator()
.setProfileActivationFilePathInterpolator(profileActivationFilePathInterpolator));
selector.addProfileActivator(new JdkVersionProfileActivator());
selector.addProfileActivator(new PropertyProfileActivator());
selector.addProfileActivator(new OperatingSystemProfileActivator());

View File

@ -80,7 +80,7 @@ bom {
]
}
}
library("Maven", "3.6.3") {
library("Maven", "3.9.4") {
group("org.apache.maven") {
modules = [
"maven-plugin-api",

View File

@ -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")
}
@ -39,6 +41,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")
}