You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jeff Evans (JIRA)" <ji...@apache.org> on 2018/08/29 21:58:00 UTC

[jira] [Created] (MASSEMBLY-894) Local artifactScope overriding results in compile transitive dependencies being omitted

Jeff Evans created MASSEMBLY-894:
------------------------------------

             Summary: Local artifactScope overriding results in compile transitive dependencies being omitted
                 Key: MASSEMBLY-894
                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-894
             Project: Maven Assembly Plugin
          Issue Type: Bug
          Components: dependencySet, filtering
    Affects Versions: 3.1.0
            Reporter: Jeff Evans


Consider the following dependencies
 * moduleA (compile) depends on moduleB (compile) which depends on libraryX (compile)
 * moduleA also depends on libraryX directly, but at a test scope

In this scenario, when defining a dependencySet to capture the runtime dependencies of moduleA, I would expect libraryX to be included, but it seems it's not.  That's because the test scope we use directly in moduleA is overriding the compile scope from moduleB.  I would think that the dependency should be included, as its a compile (and thus runtime) dependency of moduleB, and therefore of moduleA itself, even though it's not a compile time dependency of moduleA directly.

I have attached a sample project to illustrate this behavior.  If you run {{mvn package}}, the {{jackson-core}} jars (and others) do not end up in the final distribution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)