Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

dependency:list -DincludeScope=compile lists compile scope for transitive dependencies of test scope items

$
0
0
Hi all,

Do I have a problem with maven-dependency-plugin 2.8 or with my
understanding of dependency scope?

I run "mvn dependency:list -DincludeScope=compile" and see items which
are transitive dependencies of "test" scope items.

My project depends on "org.apache.httpcomponents:httpclient:jar:4.1*:test*"

and httpclient depends on "org.apache.httpcomponents:httpcore:jar:4.1:*
compile*"

If I look at compile scope dependencies, I do not expect to see anything
below httpclient because it's test scope and the branch of dependencies
beneath it should be filtered out.

However, "mvn dependency:list -DincludeScope=compile
-DexcludeScope=test|grep -i http.*core" lists httpcore
[INFO] org.apache.httpcomponents:httpcore:jar:4.1:compile

*My Project's dependency:tree output
*[INFO] +- org.apache.httpcomponents:httpclient:jar:4.1:*test*
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.1:*compile*
[INFO] | +- commons-logging:commons-logging:jar:1.1:test
[INFO] | \- commons-codec:commons-codec:jar:1.4:compile

Am I missing a flag that handles this "properly" or am I misunderstanding
what proper is in this situation.

Thanks for the help

Peter

Viewing all articles
Browse latest Browse all 5648

Trending Articles