You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2026/08/28 14:29:49 UTC

(maven) branch maven-4.0.x updated: chore: enable PathConflictResolver by default (#12662) (#12893)

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch maven-4.0.x
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/maven-4.0.x by this push:
     new f090775f1f chore: enable PathConflictResolver by default (#12662) (#12893)
f090775f1f is described below

commit f090775f1f4d495bfe34415a3944c298f36cd342
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Fri Aug 28 16:29:43 2026 +0200

    chore: enable PathConflictResolver by default (#12662) (#12893)
    
    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 <no...@anthropic.com>
---
 apache-maven/src/assembly/maven/conf/maven-user.properties | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/apache-maven/src/assembly/maven/conf/maven-user.properties b/apache-maven/src/assembly/maven/conf/maven-user.properties
index b218c3d138..8b0bdcf10e 100644
--- a/apache-maven/src/assembly/maven/conf/maven-user.properties
+++ b/apache-maven/src/assembly/maven/conf/maven-user.properties
@@ -31,4 +31,13 @@
 ${includes} = ?"${maven.user.conf}/maven-user.properties", \
               ?"${maven.user.conf}/maven.properties", \
               ?"${maven.project.conf}/maven-user.properties", \
-              ?"${maven.project.conf}/maven.properties",
+              ?"${maven.project.conf}/maven.properties"
+
+#
+# Conflict Resolver
+#
+# Selects the dependency conflict resolution algorithm.
+# Options: auto (classic), classic, path
+# The "path" resolver uses an O(N) algorithm based on a parallel path tree,
+# significantly faster than the O(N^2) classic resolver on large dependency graphs.
+aether.conflictResolver.impl = path