mvn dependency:tree 使用详解

Maven Dependency插件Goal tree分析工程artifacts依赖

来自 
https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html

常用Optional Parameters
常用参数,可在命令行中作用 -D参数名=参数值指定

appendOutput:追加输出,而不是覆盖

excludes,includes:通过逗号分离,格式[groupId]:[artifactId]:[type]:[version],支持通配符*

outputFile:指定输出文件路径

outputType:指定输出文件格式,默认text,还支持dot,graphml,tgf

输出工程依赖关系

mvn dependency:tree


重定向至文本文件

mvn dependency:tree -D outputFile=dependency_tree.txt
mvn dependency:tree -Dverbose -D outputFile=dependency_tree.txt


graphml格式,可使用Gephi打开,官网链接 https://gephi.org/ 或者使用yWorks的GraphMLViewer,需要嵌入浏览器中,这个比较小,只有1.1MB,https://www.yworks.com/downloads#GraphMLViewer

mvn dependency:tree -D outputFile=dependency_tree.graphml -D outputType=graphml


只搜索某一指定依赖,比如只搜索jackson jar包

正因为当初对未来做了太多的憧憬,所以对现在的自己尤其失望。生命中曾经有过的所有灿烂,终究都需要用寂寞来偿还。
原文地址:https://www.cnblogs.com/candlia/p/11919956.html