首页 技术 正文
技术 2022年11月23日
0 收藏 512 点赞 5,030 浏览 773 个字

摘自:http://www.708luo.com/posts/2013/11/maven-dependency-slash-mark/

一个mvn dependency:tree命令执行的输出如下:

[INFO] +- junit:junit:jar:3.8.1:test (scope not updated to compile)
[INFO] +- com.dianping:easyUtil:jar:0.0.2-SNAPSHOT:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] | +- org.slf4j:slf4j-log4j12:jar:1.5.8:compile
[INFO] | | \- log4j:log4j:jar:1.2.14:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile

这是一个树形结构,展示了各个包之间的依赖关系,不过令我比较好奇的是,为什么有些包前面是\-

为了搞清楚这个问题,google了半天也没找到正确答案,差点抑郁了:)

后来在看另外一个文章的时候,有人提到最好用\-来表示同一层依赖的最后一个节点,一下子意识到上面的mvn命令输出中的\-应该就是这个意思。

何为同一层依赖的最后一个节点?打个可能不太恰当的比喻:他是他爸最小的儿子(如果把依赖树看成家族树,依赖树的根节点看作“老祖宗”的话)。另外,即使他有儿子了,他的标示符还是\-

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,910
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,435
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,250
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,061
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,693
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,731