文章目录
  1. 1. 依赖树分析

最近处理知识产权相关的事宜,需要统计项目内的所有第三方依赖的license.

一行命令搞定

1
mvn license:aggregate-third-party-report

会在target目录下输出aggregate-third-party-report.html文件,直接浏览器打开查看就可以了。

更多细节参考官网:

http://www.mojohaus.org/license-maven-plugin/index.html

依赖树分析

1
mvn dependency:tree

这个命令会返回 maven 依赖树,对于 排除冲突的包,是一个很好的工具。会返回类似以下的内容:

1
2
3
4
5
6
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ common-sql ---
[INFO] +- org.springframework:spring-jdbc:jar:5.3.20:compile
[INFO] +- org.springframework:spring-beans:jar:5.3.20:compile
[INFO] +- org.springframework:spring-core:jar:5.3.20:compile
[INFO] \- org.springframework:spring-jcl:jar:5.3.20:compile
[INFO] \- org.springframework:spring-tx:jar:5.3.20:compile
文章目录
  1. 1. 依赖树分析