maven项目分析声明但未被使用的依赖包
·
分析声明但未被使用的依赖包:
在pom.xml文件所在的目录中执行以下命令,执行完成后,输出结果到txt文件中。
-- 不指定配置文件
mvn dependency:analyze-only >> D:/only_tree.txt
-- 指定配置文件
mvn dependency:analyze-only -s D:\DevTools\apache-maven-3.5.4\conf\settings_sec.xml >> D:/only_tree.txt

为什么要指定配置文件?
主要为了解决Could not find artifact xxxxxx in alimaven 问题。
比如下面的报错:

更多精彩内容:https://codernav.com

更多推荐



所有评论(0)