我遇到了一个问题,需要编译一个带有许多依赖项的jar包,尤其是
为什么jruby-complete的依赖项没有在树形结构中列出?
snakeyaml
的重叠版本(我们需要1.11,某个依赖项引入了1.9)。我们运行了 mvn dependency:tree
,但是我们在任何输出中都没有看到冲突的辅助版本。经过进一步检查,发现是 jruby-complete
引入了 snakeyaml
。为什么 mvn dependency:tree
没有显示这个级别的详细信息呢?[INFO] | | +- org.apache.hbase:hbase-it:jar:0.98.6-cdh5.2.5:compile
[INFO] | | | +- (org.apache.hbase:hbase-common:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | +- (org.apache.hbase:hbase-protocol:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | +- (org.apache.hbase:hbase-client:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | +- org.apache.hbase:hbase-shell:jar:0.98.6-cdh5.2.5:compile
[INFO] | | | | +- (org.apache.hbase:hbase-common:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.hbase:hbase-protocol:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.hbase:hbase-client:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.hbase:hbase-prefix-tree:jar:0.98.6-cdh5.2.5:runtime - omitted for duplicate)
[INFO] | | | | +- (org.apache.hbase:hbase-server:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.hbase:hbase-hadoop-compat:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.hbase:hbase-hadoop2-compat:jar:0.98.6-cdh5.2.5:compile - omitted for duplicate)
[INFO] | | | | +- (com.yammer.metrics:metrics-core:jar:2.2.0:compile - omitted for duplicate)
[INFO] | | | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.2)
[INFO] | | | | +- org.jruby:jruby-complete:jar:1.6.8:compile
>>>>>>> WHY ARE THERE NO DEPENDENCIES HERE? >>>>>>>>>
[INFO] | | | | +- (org.cloudera.htrace:htrace-core:jar:2.04:compile - omitted for duplicate)
[INFO] | | | | +- (org.apache.hadoop:hadoop-common:jar:2.5.0-cdh5.2.5:compile - omitted for duplicate)
为什么jruby-complete的依赖项没有在树形结构中列出?
mvn dependency:tree
只能到一定深度吗? 这里有什么规则?如果 mvn dependency:tree
仅显示了它的 snakeyaml
依赖项,我们可以节省几个小时进行复杂的调试。