Hi Sergey,

Thanks for the thorough testing and the detailed report. Here's a status
update on each point:

#1 — IDEA regression

Root-caused. The "forward port Maven 3.10.0 PluginDependenciesResolver
changes" commit (eaa575e89c, June 22) added two new abstract methods to
PluginDependenciesResolver (resolveCoreExtensionAndFlatten and
resolvePluginAndFlatten) without default implementations. IDEA's
Maven40PluginDependenciesResolver doesn't implement them, causing an
AbstractMethodError. The interface header says "not part of the public
API", but IDEA relies on it. Fix for rc-7: add default implementations that
delegate to the existing methods. I've also opened the IDEA ticket for
tracking: https://youtrack.jetbrains.com/issue/IDEA-392211

#2 — Performance regression

JFR profiling on the multiproject generator (4,383 modules) confirms a
significant regression. The root cause is not the immutable model (< 2.5%
CPU), but the TransitiveDependencyManager in the Resolver. It derives a new
child manager at every node in the dependency graph
(deriveUntil=Integer.MAX_VALUE), whereas ClassicDependencyManager (Maven 3)
stops at depth 2. This creates a cascade of MMap.done() freezes,
Key.equals() calls through RelocatedArtifact delegation, and deep
AbstractMap.equals() comparisons — 28% of total CPU time in methods that
have zero samples in Maven 3.

Workaround: -Dmaven.resolver.dependencyManagerTransitivity=false restores
ClassicDependencyManager behavior. On the test project this brings the
build from 793s down to 19s.

Fix: PR https://github.com/apache/maven-resolver/pull/2014 reuses the
DependencyManager instance when no new management data is collected (the
common case for transitive POMs without <dependencyManagement>), plus
additional optimizations on Key, MMap.equals(), and
AbstractDependencyManager.equals() to cache coordinate strings and
short-circuit on hashCode mismatches. With all optimizations applied, Maven
4 with TransitiveDependencyManager matches the 19s build time — a 42×
improvement over the unpatched build.

#3 — project-local-repo race condition

Acknowledged, tracked at https://github.com/apache/maven/issues/12646 and
being worked on.

#4 — Resolution strategy change

This is the intentional change from ClassicDependencyManager (depth ≤ 2) to
TransitiveDependencyManager (all depths) in Maven 4. It can be overridden
per build with:
-Dmaven.resolver.dependencyManagerTransitivity=false
See https://github.com/apache/maven/issues/12648 for discussion.

------------------------
Guillaume Nodet


Le ven. 31 juil. 2026 à 15:14, Sergey Chernov <[email protected]> a
écrit :

> -1 (nb)
>
> 1. FYI IDEA 2026.2.1 Preview does not support Maven 4.0.0-rc-6 [third
> attempt] import, it was fine on the second attempt. This IDEA version
> already implemented 3.10.0-rc support
> Ticket:
>
> https://youtrack.jetbrains.com/issue/IDEA-392211/Support-Maven-4.0.0-rc-6-import
>
> 2. The build performance is noticeably worse,than 3.9.16, I had to increase
> timeouts in CI as the process was just killed as too long.
> Reproducers:
> - Maven multiproject generator
> https://github.com/maven-turbo-reactor/maven-multiproject-generator
>   1m5s on 3.9 vs 1m29s on 4.0
> - Maven multimodule reproducer (shared in DM with Tamas)
>   6s on 3.9 vs 14s on 4.0
>
> 3. Maven clean race condition of target/project-local-repo when root
> project has parent, submitted https://github.com/apache/maven/issues/12646
>
> 4. The resolution strategy of the "closest" version is changed, see
> https://github.com/apache/maven/issues/12648
>
>
>
> On Fri, Jul 31, 2026 at 1:50 PM Sylwester Lachiewicz <
> [email protected]>
> wrote:
>
> > +1
> >
> > czw., 30 lip 2026, 18:31 użytkownik Guillaume Nodet <[email protected]>
> > napisał:
> >
> > > Hi all,
> > >
> > > We solved the following issues since rc-5:
> > >    https://github.com/apache/maven/releases/tag/maven-4.0.0-rc-6
> > >
> > > Issues fixed since the first rc-6 attempt:
> > > - Fix #12583: Inverted file existence check in DefaultTransport.put()
> > > - Remove erroneous PathSelector optimization that skipped path
> > > relativization
> > > - Remove PathSelector include-based directory pre-filtering
> optimization
> > > - Add Apache license headers and fix NOTICE files to address ATR
> concerns
> > > - [MNG-8507] mvnup: skip dedup inside plugin <configuration> elements
> > >
> > > Issues fixed since the second rc-6 attempt:
> > > - Fix BOM consumer POM leaving property references unresolved (#12627)
> > > - Use resource filtering for mng-12534 IT plugin mavenVersion to avoid
> > > hardcoded versions
> > >
> > > Staging repo:
> > >   https://repository.apache.org/content/repositories/maven-2452/
> > >
> > > Source release:
> > >
> > >
> > >
> >
> https://repository.apache.org/content/repositories/maven-2452/org/apache/maven/apache-maven/4.0.0-rc-6/apache-maven-4.0.0-rc-6-src.zip
> > >
> > > Source release SHA-512:
> > >
> > >
> > >
> >
> 5150cb8168e62cc0bae24516f35293eaac0d099e45a2f0c8ec40a96b1cc9c384f26abe943cfa57ac9c4cf3f762ef7e413c43242106bea0ffa3d9f8a3709d431e
> > >
> > > Distribution:
> > >   https://dist.apache.org/repos/dist/dev/maven/maven-4/4.0.0-rc-6/
> > >
> > > Staging site:
> > >   https://maven.apache.org/ref/4-LATEST/
> > >
> > > Guide to testing staged releases:
> > >
> > https://maven.apache.org/guides/development/guide-testing-releases.html
> > >
> > > Vote open for at least 72 hours.
> > >
> > > [ ] +1
> > > [ ] +0
> > > [ ] -1
> > >
> > > Guillaume Nodet
> > >
> >
>

Reply via email to