perNyfelt commented on PR #163:
URL: 
https://github.com/apache/maven-resolver-ant-tasks/pull/163#issuecomment-5159873534

   Good point — I reproduced apache/maven#12648 through the Ant tasks, and 
added a way to opt in.
   
   **Default behaviour is unchanged.** 
`SessionBuilderSupplier.configureSessionBuilder()` calls the no-arg 
`getDependencyManager()`, which delegates to `getDependencyManager(false)` → 
`ClassicDependencyManager`, so the tasks stay on the Maven 3.9/3.10 side. 
Resolving your scenario — a POM importing `spring-boot-dependencies:4.1.0`, 
depending on `io.confluent:kafka-schema-registry-client:7.5.12`, with the 
confluent repo added — gives an identical 23-artifact tree on master (resolver 
1.9.27) and on this PR (2.0.21), `snappy-java` 1.1.10.7 either way. Four 
unrelated trees (`spring-boot-starter-web:3.2.0`, `maven-core:3.9.9`, 
`kafka-clients:3.7.0`, `jackson-databind:2.16.0`) also come out identical: 72 
artifacts, same GAVs, same classpath order.
   
   **But there was no way to opt in, so I added one** (last commit). 
`resolver.dependencyManagerTransitivity=true` switches the session to 
`TransitiveDependencyManager`; the default stays `false`. On your scenario:
   
   | | `snappy-java` |
   |---|---|
   | master (resolver 1.9.27) | 1.1.10.7 |
   | this PR, default | 1.1.10.7 |
   | this PR, `-Dresolver.dependencyManagerTransitivity=true` | 1.1.10.5 |
   
   which lines up with the Maven 3 and Maven 4 answers in the issue. There is 
also a synthetic offline case in the unit tests' spirit — `a → b → c → d:1.0` 
where `a` manages `d:2.0` — that resolves `d:1.0` by default (Maven 3.9.14 
agrees on the same artifacts) and `d:2.0` with the property set. Unit tests 
cover both settings and fail if the wiring is removed.
   
   I named it after the existing `resolver.offline` rather than Maven's 
`maven.resolver.dependencyManagerTransitivity`; happy to switch to Maven's 
spelling, or honour both, if you would rather have the names match.
   
   The other default that changed is the collector: 
`aether.dependencyCollector.impl` is `df` in 1.9.27 and `bf` in 2.0.21, which 
is why the tests now tune `aether.dependencyCollector.bf.threads`. BF should be 
result-equivalent, and the trees above are consistent with that, but it is the 
first place to look if anyone reports drift — 
`-Daether.dependencyCollector.impl=df` restores the old collector, since 
`DfDependencyCollector` still ships in 2.0.21 and `AntRepoSys` folds system 
properties into the session config properties.
   


-- 
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