我添加了一个提供了作用域的库,但是仍然添加了一些子依赖项。
这是mvn dependency:tree
[INFO] +- org.apache.phoenix:phoenix-core:jar:4.10.0-HBase-1.1:provided
[INFO] | +- org.apache.tephra:tephra-api:jar:0.9.0-incubating:provided
[INFO] | +- org.apache.tephra:tephra-core:jar:0.9.0-incubating:provided
[INFO] | | +- com.google.code.gson:gson:jar:2.2.4:provided
[INFO] | | +- com.google.inject:guice:jar:3.0:provided
[INFO] | | | +- javax.inject:javax.inject:jar:1:provided
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:provided
[INFO] | | +- com.google.inject.extensions:guice-assistedinject:jar:3.0:provided
[INFO] | | +- org.apache.thrift:libthrift:jar:0.9.0:provided
[INFO] | | +- it.unimi.dsi:fastutil:jar:6.5.6:provided
[INFO] | | +- org.apache.twill:twill-common:jar:0.6.0-incubating:provided
[INFO] | | +- org.apache.twill:twill-core:jar:0.6.0-incubating:provided
[INFO] | | | +- org.apache.twill:twill-api:jar:0.6.0-incubating:provided
[INFO] | | | \- org.ow2.asm:asm-all:jar:5.0.2:provided
[INFO] | | +- org.apache.twill:twill-discovery-api:jar:0.6.0-incubating:provided
[INFO] | | +- org.apache.twill:twill-discovery-core:jar:0.6.0-incubating:provided
[INFO] | | \- org.apache.twill:twill-zookeeper:jar:0.6.0-incubating:provided
[INFO] | +- org.apache.tephra:tephra-hbase-compat-1.1:jar:0.9.0-incubating:provided
[INFO] | +- org.antlr:antlr-runtime:jar:3.5.2:provided
[INFO] | +- jline:jline:jar:2.11:provided
[INFO] | +- sqlline:sqlline:jar:1.2.0:provided
[INFO] | +- com.google.guava:guava:jar:13.0.1:provided
[INFO] | +- joda-time:joda-time:jar:1.6:compile
[INFO] | +- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:provided
[INFO] | +- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:provided
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:provided
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:provided
[INFO] | +- junit:junit:jar:4.12:compile
[INFO] | | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:2.5.0:provided
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.0.1:compile
如果您查看最后一行,它将被编译
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.0.1:
编译
答案 0 :(得分:0)
我能够找到问题所在。我曾经追踪的伙伴。
mvn dependency:tree -Dincludes=org.apache.httpcomponents:httpclient