Provided scope not being applied correctly

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Provided scope not being applied correctly

David Hoffer
I have a module that has a provided scope dependency on a zip file (just
resources so no need for any dependencies).  The zip was produced via the
maven-assembly-plugin in another module.

The problem is that transitive dependencies of this zip are being included
in the war being generated.


Note its marked as provided so none of its dependencies should be included.

[INFO] |  +-
[INFO] |  +-
[INFO] |  |  \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.11:compile
[INFO] |  |     +- org.apache.cxf:cxf-api:jar:2.7.11:compile
[INFO] |  |     \- org.apache.cxf:cxf-rt-core:jar:2.7.11:compile
[INFO] |  \- org.apache.cxf.xjc-utils:cxf-xjc-runtime:jar:2.7.0:provided
[INFO] |     \- javax.xml.bind:jaxb-api:jar:2.1:provided
[INFO] |        +-
[INFO] |        \- javax.activation:activation:jar:1.1:provided

Note the 3 compile time dependencies above, these are being included in the
war but should not be because they should be provided.

Ideally when I created the zip I'd like it to have have any dependencies at
all but when using it marking as provided should work too.

I'm using Maven 3.5.0.  What is going on here?