Enable PathConflictResolver by default - #12662
Conversation
Switch the default conflict resolver from "classic" (O(N²)) to "path" (O(N)) via maven-user.properties. Benchmarking on a 4383-module generated reactor shows a 36% wall-time reduction for `mvn clean install -DskipTests` (2:45 → 1:45 on Apple M4 Pro). The PathConflictResolver has been available since resolver 2.0.11 and produces the same resolution results as ClassicConflictResolver while operating in O(N) time via a parallel path tree structure. Users can revert to the classic resolver by setting `-Daether.conflictResolver.impl=classic`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
left a comment
There was a problem hiding this comment.
Clean, low-risk performance improvement. Switching the default conflict resolver from classic (O(N²)) to path (O(N)) via a single properties file change is a solid approach.
The resolver version (2.0.20) is well above the 2.0.11 minimum when PathConflictResolver was introduced, and the fallback mechanism (-Daether.conflictResolver.impl=classic) provides an adequate escape hatch.
Minor observation: the comment on line 66 lists "auto (classic)" as an option — if "auto" is an internal alias, consider clarifying or dropping it to avoid user confusion.
CI is still pending — the existing conflict resolution integration tests should implicitly exercise the new default once it passes.
Note: Cannot submit as APPROVE because the PR author matches the review account.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
Summary
classic(O(N²)) topath(O(N)) viamaven-user.propertiesPathConflictResolverhas been available since resolver 2.0.11 and produces the same resolution results asClassicConflictResolver-Daether.conflictResolver.impl=classicBenchmark Results
Tested on a 4383-module generated reactor project (Apple M4 Pro, JDK 21):
mvn clean install -DskipTestsclassic(current default)pathThe
ClassicConflictResolver.gatherConflictItems()performs O(N×M) recursive DFS and accounts for 46.7% of total CPU on large reactor builds (measured via JFR profiling). ThePathConflictResolverreplaces this with an O(N) parallel path tree algorithm.Test plan
pathresolver🤖 Generated with Claude Code