From e411becb5390ae3353108b4f217ab9b4eb683de7 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 24 Sep 2024 09:34:29 -0700 Subject: [PATCH] Upgrade Maven from 3.8.1 to 3.9.6 --- pom.xml | 4 ++-- .../acceptance/utils/aether/AetherModule.java | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f0a244f1f..aec62a810 100644 --- a/pom.xml +++ b/pom.xml @@ -33,8 +33,8 @@ 4.25.0 33.3.0-jre - 3.8.1 - 1.6.2 + 3.9.6 + 1.9.18 3.0.22 1.3.13 false diff --git a/src/main/java/org/jenkinsci/test/acceptance/utils/aether/AetherModule.java b/src/main/java/org/jenkinsci/test/acceptance/utils/aether/AetherModule.java index 6253975b3..ae4d06624 100644 --- a/src/main/java/org/jenkinsci/test/acceptance/utils/aether/AetherModule.java +++ b/src/main/java/org/jenkinsci/test/acceptance/utils/aether/AetherModule.java @@ -9,13 +9,16 @@ import jakarta.inject.Singleton; import java.util.Collections; import java.util.HashSet; +import java.util.Map; import java.util.Set; import org.apache.maven.model.building.DefaultModelBuilderFactory; import org.apache.maven.model.building.ModelBuilder; import org.apache.maven.repository.internal.DefaultArtifactDescriptorReader; +import org.apache.maven.repository.internal.DefaultModelCacheFactory; import org.apache.maven.repository.internal.DefaultVersionRangeResolver; import org.apache.maven.repository.internal.DefaultVersionResolver; import org.apache.maven.repository.internal.MavenRepositorySystemUtils; +import org.apache.maven.repository.internal.ModelCacheFactory; import org.apache.maven.repository.internal.SnapshotMetadataGeneratorFactory; import org.apache.maven.repository.internal.VersionsMetadataGeneratorFactory; import org.eclipse.aether.DefaultRepositorySystemSession; @@ -31,6 +34,7 @@ import org.eclipse.aether.spi.connector.transport.TransporterFactory; import org.eclipse.aether.transfer.TransferEvent; import org.eclipse.aether.transport.file.FileTransporterFactory; +import org.eclipse.aether.transport.http.ChecksumExtractor; import org.eclipse.aether.transport.http.HttpTransporterFactory; import org.jenkinsci.test.acceptance.utils.MavenLocalRepository; @@ -97,6 +101,15 @@ public void transferProgressed(TransferEvent event) { return session; } + /** + * Checksum extractors (none). + */ + @Provides + @Singleton + Map provideChecksumExtractors() { + return Collections.emptyMap(); + } + /** * Repository system connectors (needed for remote transport). */ @@ -143,4 +156,9 @@ Set provideMetadataGeneratorFactories( ModelBuilder provideModelBuilder() { return new DefaultModelBuilderFactory().newInstance(); } + + @Provides + ModelCacheFactory provideModelCacheFactory() { + return new DefaultModelCacheFactory(); + } }