gnodet opened a new pull request, #14172:
URL: https://github.com/apache/maven/pull/14172

   > **Temporary workaround — must be reverted when upgrading to a Resolver 
release that includes apache/maven-resolver#2368.**
   > Once a fixed Resolver version is bundled, please open an issue to remove 
the `putIfAbsent` call and the `BfDependencyCollector` import added by this PR.
   
   ## 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 
by `G:A:C:E` — no version. When a conflict selects a higher-version winner, but 
that exact `G:A:C:E` tuple 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, causing 
`ClassNotFoundException` at runtime.
   
   The fix is in the Resolver: apache/maven-resolver#2368 changes 
`DEFAULT_SKIPPER` from `versionless` to `versioned`, so each `G:A:C:E:V` is 
treated as a distinct node.
   
   ## Fix
   
   In `DefaultRepositorySystemSessionFactory.newRepositorySessionBuilder()`, 
before the session config is assembled, Maven now injects 
`aether.dependencyCollector.bf.skipper=versioned` as a soft default via 
`mergedProps.putIfAbsent(...)`. Because this runs before system/user properties 
override `mergedProps`, it behaves exactly like a "changed default":
   
   - All users are fixed transparently with no config change
   - `-Daether.dependencyCollector.bf.skipper=versionless` still overrides it 
for anyone who needs the old behaviour
   
   ## Tests
   
   Existing `DefaultRepositorySystemSessionFactoryTest` (16 tests) all pass.
   
   Fixes #14155
   
   ---
   _Hermes Agent (Claude Sonnet 4.5) on behalf of Guillaume Nodet_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to