arturobernalg commented on issue #680:
URL: 
https://github.com/apache/maven-shade-plugin/issues/680#issuecomment-6520125331

   Tried to build a minimal reproducer for this -- a project depending on 
`commons-beanutils:1.9.4` (which pulls in `commons-logging` and 
`commons-collections` as compile-scope transitives), with 
`createDependencyReducedPom`, `promoteTransitiveDependencies`, and 
`keepDependenciesWithProvidedScope` all `true`. Ran it against both 3.6.2 (the 
version this was filed against) and current master (3.7.0-SNAPSHOT).
   
   With no `artifactSet` configured at all, both transitives get bundled into 
the shaded jar and correctly come out as `provided` in the dependency-reduced 
POM on both versions.
   
   I then tried adding an `artifactSet` (both an `includes` naming only the 
top-level artifact, and an `excludes` naming only one of the two transitives) 
to see if that's what triggers it, matching your `artifactSet becomes a set of 
trees` comment. In every variant I tried, whatever actually ends up bundled in 
the jar (verified by listing the jar's contents, not just reading the POM) does 
get `provided` scope, and whatever gets excluded from bundling correctly keeps 
its original scope -- which is the correct behavior, not a bug. I also checked 
the code path: artifact selection for bundling and for the 
dependency-reduced-POM's provided/removal marking both run off the exact same 
`ArtifactSelector.isSelected()` call over the same `project.getArtifacts()` 
snapshot, so by construction they can't disagree (an artifact can't be bundled 
without also being tracked for the scope rewrite).
   
   So I couldn't reproduce this with the configurations I tried, on either 
version. @delanym a minimal project (even just a pom.xml + the two/three 
dependency coordinates and your exact `artifactSet` config, if any) would help 
a lot -- in particular I'd like to see the exact `artifactSet` include/exclude 
patterns you were using, since that's the detail that seems to matter.


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