mauhiz commented on PR #1659:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/1659#issuecomment-6306124235

   Rebased onto master and added `go-offline-transitive-reactor`: module A 
depends on an external mock-repository artifact, which depends on reactor 
module B. It verifies that the external JAR is resolved and B's JAR is neither 
requested nor downloaded. The test fails against upstream's implementation when 
it tries to download B.
   
   The existing five-argument `resolveDependenciesForArtifact` overload cannot 
be used directly by go-offline without regressions. Its `CollectRequest` 
constructor takes a root dependency and managed dependencies; it does not 
populate the request's dependency list from the supplied dependencies. It then 
replaces those managed dependencies with the supplied management list. Resolver 
reads dependencies from the project's POM instead, bypassing go-offline's 
filtered dependency list, and also resolves the project artifact itself. This 
broke the existing filtering and classifier ITs, and failed on the unbuilt 
project artifact when `excludeReactor=false`.
   
   I exposed the existing `resolveDependencies(CollectRequest, 
DependencyFilter)` helper and made go-offline pass a dependency-only request 
using `setRootArtifact`. This preserves its collection behavior while applying 
the reactor filter throughout artifact resolution. The existing resolver 
overloads retain their behavior.
   
   Validation: Spotless passed; 38 focused unit tests and all six go-offline 
ITs passed, including the new transitive case and an added 
`excludeReactor=false` invocation of the existing go-offline IT.
   
   Full `mvn verify` ran 465 tests and reported five failures and five errors 
in the existing get, tree, copy-dependencies, and unpack-dependencies tests. 
These affected tests also fail in a clean worktree of upstream master 
(`91b913ba`) in this environment. Verification used Maven 3.9.11 and JDK 21.
   


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