【发布时间】:2012-03-30 13:55:27
【问题描述】:
首先,让我先说mvn dependency:tree 在我的场景中不起作用。
我正在处理一个已经存在的代码库,它导致构建失败。问题是 maven repos(包括 nexus)在这个项目中没有传递依赖(org.apache.ws.security:wss4j:pom:1.5.2)的 POM。
我想找到这个依赖的来源。它可能是一个传递依赖,因为它既没有列在项目的 pom 中,也没有列在父 pom 中。调用mvn dependency:tree 不起作用,因为它也会失败,并出现与我使用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]
【问题讨论】:
-
[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添加你的 pom - 也许插件之一 (cxf) 需要它 -
你是说这个警告是构建失败的原因吗?正如我目前所见,警告不会导致构建失败。而且,错误消息说“无法传输工件 org.apache.ws.security:wss4j:pom:1.5.2”!!我在这里错过了什么?
标签: maven dependencies maven-3