Repository navigation
Conversation
Maven 3.10.0 moves from Resolver 1.9 to Resolver 2.0, which requires more than a version bump: - Bump Maven to 3.10.0, MIMA to 3.0.1 and Sisu to 1.1.0; replace the removed maven-resolver-transport-http with maven-resolver-transport-apache - Keep the pre-order (depth-first) ordering of resolved artifacts; Resolver 2 defaults to level-order. Opt in with -Daether.system.dependencyVisitor=levelOrder - Work around Resolver 2.0.24 passing the filtered node itself as the first element of DependencyFilter parents, which broke ancestor based filters - Build POMs loaded from file with validation level 2.0, as Maven 3.10 treats lower levels as external models (no file based profile activation, restricted interpolation) - Make ClasspathWorkspaceReader.findArtifact thread safe, as Resolver 2 collects dependencies in parallel - Require Maven 3.10.0 for the Maven plugin, as MIMA 3 uses Resolver 2 APIs - Use Maven 3.10.0 as default Embedded Maven version and for the wrapper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the Path based Resolver 2 APIs instead of the deprecated File based ones (Artifact, RepositoryEvent, LocalRepository) and ConfigurableVersionSelector with the Nearest strategy instead of NearestVersionSelector. The public ShrinkWrap API is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maven 3.10.0 is based on Maven Resolver 2.0 (2.0.24) instead of 1.9, so the
dependabot bumps fail CI (#571, #573, #552). This PR does the full upgrade and
supersedes #571, #573, #570 and #552.
Changes
maven-resolver-transport-httpno longer exists in Resolver 2, replaced bymaven-resolver-transport-apache(same as Maven 3.10 and MIMA standalone)Behaviour fixes needed for Resolver 2 / Maven 3.10
ShrinkWrap keeps pre-order (depth-first) by default, so
asFile()order isunchanged.
-Daether.system.dependencyVisitor=levelOrderopts in. Covered bythe new
ResolutionOrderTestCase.DependencyFilter.accept(node, parents)receivesthe node itself as the first element of
parents(and not the root), becauseStack.head()drops the wrong end. This broke all ancestor basedMavenResolutionFilters (DependencyDepthTestCase,PomFilteringUnitTestCase).MavenResolutionFilterWrapnow skips the node itself.level below 2.0 as an external model from a repository, disabling file based
profile activation and restricting interpolation.
loadPomFromFilenow usesVALIDATION_LEVEL_MAVEN_2_0(ProfilesUnitTestCase.testActiveProfileByFile).collector), which made
ClasspathWorkspaceReaderfail intermittently withFWK005 parse may not be called while parsing.findArtifactis nowsynchronized.
Behaviour changes for users
interpolated (Maven 3.10 security hardening). Opt out with
-Dmaven.model.dependencyInterpolation.full=true; the test now covers both.shrinkwrap-resolver-impl-mavennow brings slf4j-api 2.x transitively.Cleanups (no user visible changes)
Pathbased Resolver 2 APIs instead of the deprecatedFilebasedones (
Artifact.getPath()/setPath(),RepositoryEvent.getPath(),LocalRepository(Path, String)). The public ShrinkWrap API still usesFile.ConfigurableVersionSelectorwith theNeareststrategy replaces thedeprecated
NearestVersionSelector(same classic Maven conflict resolution).JavaScopeSelector,ScopeDependencySelector,...) are kept on purpose: their replacements are internal Resolver classes, and
ShrinkWrap's arbitrary scope filtering does not map onto Resolver 2 resolution
scopes.
Testing
impl-maven: 4870 tests pass,dependencyConvergencepassesimpl-maven-archive, Embedded Maven (runs 3.10.0) and the Maven plugininvoker ITs pass
🤖 Generated with Claude Code