打开idea控制台,输入:
mvn dependency:tree>e:/export/tree.txt
可看到以下示例树:
[INFO] ------------------------------------------------------------------------ [INFO] Building hunttown-analysis-common-sharding 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ hunttown-analysis-common-sharding --- [INFO] com.hunttown:hunttown-analysis-common-sharding:jar:1.0-SNAPSHOT [INFO] +- org.springframework:spring-context-support:jar:4.2.6.RELEASE:provided [INFO] | +- org.springframework:spring-beans:jar:4.2.6.RELEASE:compile [INFO] | +- org.springframework:spring-context:jar:4.2.6.RELEASE:provided [INFO] | | +- org.springframework:spring-aop:jar:4.2.6.RELEASE:provided [INFO] | | - org.springframework:spring-expression:jar:4.2.6.RELEASE:provided [INFO] | - org.springframework:spring-core:jar:4.2.6.RELEASE:compile [INFO] | - commons-logging:commons-logging:jar:1.2:compile [INFO] +- org.springframework:spring-orm:jar:3.2.2.RELEASE:compile [INFO] | +- aopalliance:aopalliance:jar:1.0:compile [INFO] | +- org.springframework:spring-jdbc:jar:3.2.2.RELEASE:compile [INFO] | - org.springframework:spring-tx:jar:3.2.2.RELEASE:compile [INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.25:provided [INFO] +- org.apache.ibatis:ibatis-sqlmap:jar:2.3.4.726:compile [INFO] +- org.mybatis:mybatis:jar:3.4.6:compile [INFO] +- org.mybatis:mybatis-spring:jar:1.3.2:compile [INFO] +- commons-lang:commons-lang:jar:2.6:compile [INFO] +- com.mchange:c3p0:jar:0.9.5.2:test [INFO] | - com.mchange:mchange-commons-java:jar:0.2.11:test [INFO] +- com.h2database:h2:jar:1.4.197:test [INFO] +- log4j:log4j:jar:1.2.17:compile [INFO] +- commons-io:commons-io:jar:2.6:test [INFO] +- mysql:mysql-connector-java:jar:6.0.6:test [INFO] - org.testng:testng:jar:6.14.3:test [INFO] +- com.beust:jcommander:jar:1.72:test [INFO] - org.apache-extras.beanshell:bsh:jar:2.0b6:test