I've been hacking on the bundleall mojo a bit, and I've noticed that the
BundleAllPlugin.bundleAll(MavenProject project, int maxDepth) method not
only constructs a dependency tree for the current project, but then
*reconstructs* a dependency tree for the current project's every
transitive dependency!

When it does this, it brings in transitive optional and test-scope
dependencies, contrary to Maven's normal transitive dependency behavior.

Disabling this code (i.e. only construct a single dependency tree, then
bundle everything in it) seems to result in the correct set of artifacts
getting bundled, while optional / test-scope transitive dependencies are
skipped.

But surely the original code was done that way for a reason. Does anyone
know what the reason is? Am I breaking something by changing it like
this?

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to