通过mvn dependency:tree 查看依赖树,解决依赖jar冲突问题

举例:
E:\01workspace\chenxh\09research\rop\rop>mvn dependency:tree 
[WARNING] 
[WARNING] Some problems were encountered while building the effective settings 
[WARNING] 'pluginRepositories.pluginRepository.id' must not be 'local', this identifier is reserved for the local re 
tory, using it for other repositories will corrupt your repository metadata. @ C:\Users\Administrator\.m2\settings.x 
[WARNING] 
[INFO] Scanning for projects... 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building rop 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ rop --- 
[INFO] com.rop:rop:jar:1.0-SNAPSHOT 
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:compile 
[INFO] +- org.hibernate:hibernate-validator:jar:4.2.0.Final:compile 
[INFO] +- org.codehaus.jackson:jackson-core-asl:jar:1.9.5:compile 
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.5:compile 
[INFO] +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.5:compile 
[INFO] +- org.codehaus.jackson:jackson-xc:jar:1.9.5:compile 
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.0.0-RC2:compile 
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.0.0-RC2:compile 
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.0.0-RC2:compile 
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.0.0-RC2:compile 
[INFO] |  +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.0.0-RC2:compile 
[INFO] |  \- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile 
[INFO] |     \- javax.xml.stream:stax-api:jar:1.0-2:compile 
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile 
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile 
[INFO] +- log4j:log4j:jar:1.2.16:compile 
[INFO] +- org.springframework:spring-core:jar:3.1.1.RELEASE:compile 
[INFO] |  +- org.springframework:spring-asm:jar:3.1.1.RELEASE:compile 
[INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile 
[INFO] +- org.springframework:spring-context:jar:3.1.1.RELEASE:compile 
[INFO] |  +- org.springframework:spring-aop:jar:3.1.1.RELEASE:compile 
[INFO] |  +- org.springframework:spring-beans:jar:3.1.1.RELEASE:compile 
[INFO] |  \- org.springframework:spring-expression:jar:3.1.1.RELEASE:compile 
[INFO] +- org.springframework:spring-context-support:jar:3.1.1.RELEASE:compile 
[INFO] +- org.springframework:spring-web:jar:3.1.1.RELEASE:compile 
[INFO] |  \- aopalliance:aopalliance:jar:1.0:compile 
[INFO] +- org.springframework:spring-test:jar:3.1.1.RELEASE:compile 
[INFO] +- org.springframework:spring-webmvc:jar:3.1.1.RELEASE:compile 
[INFO] +- org.testng:testng:jar:6.3:test 
[INFO] |  +- org.beanshell:bsh:jar:2.0b4:test 
[INFO] |  +- com.beust:jcommander:jar:1.12:test 
[INFO] |  \- org.yaml:snakeyaml:jar:1.6:test 
[INFO] +- org.mockito:mockito-all:jar:1.8.5:test 
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided 
[INFO] +- org.unitils:unitils-core:jar:3.3:test 
[INFO] |  +- commons-lang:commons-lang:jar:2.3:test 
[INFO] |  +- commons-collections:commons-collections:jar:3.2:test 
[INFO] |  \- ognl:ognl:jar:2.6.9:test 
[INFO] +- org.unitils:unitils-testng:jar:3.3:test 
[INFO] |  \- org.testng:testng:jar:jdk15:5.8:test 
[INFO] |     \- junit:junit:jar:3.8.1:test 
[INFO] \- org.unitils:unitils-spring:jar:3.3:test 
[INFO]    +- org.springframework:spring-tx:jar:2.5.2:test 
[INFO]    \- org.unitils:unitils-database:jar:3.3:test 
[INFO]       +- org.unitils:unitils-dbmaintainer:jar:3.3:test 
[INFO]       |  +- org.hibernate:hibernate:jar:3.2.5.ga:test 
[INFO]       |  |  +- net.sf.ehcache:ehcache:jar:1.2.3:test 
[INFO]       |  |  +- asm:asm-attrs:jar:1.5.3:test 
[INFO]       |  |  +- dom4j:dom4j:jar:1.6.1:test 
[INFO]       |  |  +- antlr:antlr:jar:2.7.6:test 
[INFO]       |  |  +- cglib:cglib:jar:2.1_3:test 
[INFO]       |  |  \- asm:asm:jar:1.5.3:test 
[INFO]       |  \- org.dbunit:dbunit:jar:2.2.2:test 
[INFO]       |     +- junit-addons:junit-addons:jar:1.4:test 
[INFO]       |     |  +- xerces:xercesImpl:jar:2.6.2:test 
[INFO]       |     |  \- xerces:xmlParserAPIs:jar:2.6.2:test 
[INFO]       |     +- poi:poi:jar:2.5.1-final-20040804:test 
[INFO]       |     \- org.slf4j:slf4j-nop:jar:1.4.3:test 
[INFO]       +- commons-dbcp:commons-dbcp:jar:1.2.2:test 
[INFO]       |  \- commons-pool:commons-pool:jar:1.3:test 
[INFO]       \- org.springframework:spring-jdbc:jar:2.5.2:test 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 8.250s 
[INFO] Finished at: Fri Jun 08 09:08:09 CST 2012 
[INFO] Final Memory: 7M/245M 
[INFO] ------------------------------------------------------------------------ 
 

使用mvn dependency:tree --> tree.txt命令导出依赖树到txt文件,便于查看。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值