获取缺少依赖关系的maven项目的依赖关系树

首先,让我开始说mvn依赖:tree在我的方案中不起作用.
我正在开发一个已经存在的代码库,它提供了构建失败.问题是在这个项目中,maven repos(包括nexus)没有传递依赖性(org.apache.ws.security:wss4j:pom:1.5.2)的POM.

我想找到这个依赖来自哪里.这可能是一个传递性的依赖,因为它不在项目的pom中或父项pom中列出.调用mvn依赖:树不起作用,因为它也失败,当我使用mvn install(连接超时)时,我得到相同的错误.错误如下.

那么,如何确定哪个依赖试图下载这个pom?我想要一个一般的答案找到依赖树,而不是专注于上面提到的wss4j pom.

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sample/XKMS 4.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://ws.zones.apache.org/repository2/org/apache/ws/security/wss4j/1.5.2/wss4j-1.5.2.pom

[WARNING] The POM for bouncycastle:bcprov-jdk13:jar:132 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:10.155s
[INFO] Finished at: Wed Mar 14 10:35:20 IST 2012
[INFO] Final Memory: 7M/490M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project wso2appserver-samples-xkms: Could not resolve dependencies 
for project org.wso2.appserver:wso2appserver-samples-xkms:jar:4.5.0-SNAPSHOT: Failed to collect dependencies for [org.wso2.xkms:xkms:jar:2.2 (compile)]: Failed to read artifact descriptor for org.apache.ws.security:wss4j:jar:1.5.2: 
Could not transfer artifact org.apache.ws.security:wss4j:pom:1.5.2 from/to ws-zones-repository (http://ws.zones.apache.org/repository2): Error transferring file: Connection timed out -> [Help 1]
最佳答案
mvn dependency:tree --debug

在我的案件失败之前输出树.

转载注明原文:获取缺少依赖关系的maven项目的依赖关系树 - 代码日志