Repository navigation
Conversation
…ansitive deps (apache#14155) The resolver's BF dependency collector uses a "versionless" skipper by default (aether.dependencyCollector.bf.skipper=versionless), which tracks visited nodes by G:A:C:E only (no version). When a conflict selects a winner at a higher version that was already enqueued/visited without its children being expanded (because the lower-version node was seen first), the children are silently dropped, causing ClassNotFoundException at runtime. The real fix is in the resolver (apache/maven-resolver#2368) which changes the default to "versioned". As a temporary workaround, Maven now injects "versioned" as the default for this property before the user/system/profile properties are applied. Users who explicitly need "versionless" can still override via -Daether.dependencyCollector.bf.skipper=versionless. Fixes apache#14155
gnodet
force-pushed
the
fix/bf-skipper-default-4x
branch
from
November 28, 2026 18:34
84b4baf to
ca6f479
Compare
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.
Summary
Workaround for #14155: transitive dependencies silently dropped when the BF dependency collector resolves a conflict in favour of a winner that was already visited without its children expanded.
Root Cause
The BF collector's default skipper mode (
versionless) tracks visited nodes byG:A:C:E— no version. When a conflict selects a higher-version winner, but that exactG:A:C:Etuple was already visited at a lower version (without its children being expanded at that point), the collector skips the winner's subtree. Those transitive dependencies never reach the classpath, causingClassNotFoundExceptionat runtime.The fix is in the Resolver: apache/maven-resolver#2368 changes
DEFAULT_SKIPPERfromversionlesstoversioned, so eachG:A:C:E:Vis treated as a distinct node. This will ship in Resolver 2.0.27.Fix
In
DefaultRepositorySystemSessionFactory.newRepositorySessionBuilder(), before the session config is assembled, Maven now injectsaether.dependencyCollector.bf.skipper=versionedas a soft default viamergedProps.putIfAbsent(...). Because this runs before system/user properties overridemergedProps, it behaves exactly like a "changed default":-Daether.dependencyCollector.bf.skipper=versionlessstill overrides it for anyone who needs the old behaviourTests
Existing
DefaultRepositorySystemSessionFactoryTest(16 tests) all pass.Fixes #14155
Hermes Agent (Claude Sonnet 4.5) on behalf of Guillaume Nodet