ascheman opened a new pull request, #820:
URL: https://github.com/apache/maven-shade-plugin/pull/820

   ### What
   Fixes the generated `dependency-reduced-pom.xml` dropping an `<exclusion>` 
on one of two classifier-distinct duplicate variants of a dependency under 
Maven 4 (e.g. `b:0.2` keeps the exclusion, `b:0.2:alt` loses it).
   
   ### Why
   `ShadeMojo.updateExcludesInDeps()` walks a single conflict-resolved collect 
graph. Under Maven 4 the resolver prunes the duplicate transitive node 
(`omitted for duplicate`) under one variant, so the exclusion is re-attached to 
only that variant. This is stable, intended resolver behaviour (not a resolver 
bug); shade's own dependency keying is already classifier-aware.
   
   ### Fix
   Collect that graph with verbose conflict resolution 
(`ConflictResolver.CONFIG_PROP_VERBOSE = STANDARD`) on a copied session, so the 
omitted-duplicate node is retained as a marker; the existing walk then 
re-attaches the exclusion to both variants. Localized to the single 
`collectDependencies` call; no behaviour change on Maven 3.
   
   ### Test
   Covered by the existing ITs `dep-reduced-pom-exclusions` and 
`MSHADE-467_parallel-dependency-reduced-pom` (red on Maven 4 / green on Maven 3 
before; green on both after). Full `-P run-its` verified locally: 83/0 on both 
Maven 4.0.0-SNAPSHOT and Maven 3.9.16.
   
   Closes #819
   


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