gnodet opened a new pull request, #14171: URL: https://github.com/apache/maven/pull/14171
## Summary Temporary workaround for #14155: transitive dependencies silently dropped when using the BF dependency collector (the default since Maven 3.10 / Resolver 2.0.x). ## Root Cause The BF collector's skipper tracks visited nodes to avoid re-expanding them. The default mode (`versionless`) identifies nodes by `G:A:C:E` only — ignoring version. When a conflict selects a higher-version winner, but that winner's coordinates (without version) were already enqueued/visited, the collector skips its children. Those transitive dependencies are never added to the classpath, causing `ClassNotFoundException` at runtime. The real fix is in the Resolver: apache/maven-resolver#2368 changes `DEFAULT_SKIPPER` from `versionless` to `versioned`. ## Fix Before the session config properties are assembled, Maven now injects `aether.dependencyCollector.bf.skipper=versioned` as a soft default (via `putIfAbsent` on the merged properties map). This means: - Users are fixed automatically with no config change - Users who explicitly want `versionless` can still use `-Daether.dependencyCollector.bf.skipper=versionless` - Once a Resolver release with the real fix ships, this workaround can be removed (the resolver default will match) ## Tests Existing `DefaultRepositorySystemSessionFactoryTest` (17 tests) all pass. The functional regression test requires a multi-module project with the specific grpc conflict graph described in #14155 — not added here since this is a workaround pending the resolver fix. ## Checklist - [x] Code change is minimal and focused - [x] Spotless passes - [x] Unit tests pass locally 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]
