Maven部署失败

时间:2012-11-09 08:12:15

标签: maven nexus pom.xml

我正在运行maven 3.0.4。我能够成功运行干净,打包,安装。但是当我运行mvn deploy时,我得到一个错误的错误:

我正在测试这个包含4个项目的小型java模块:1个父P1和3个孩子C1,C2,C3。现在,此父P1继承自当前未在存储库中上载的主项目M1。所以问题。当我尝试构建P1时,它会抛出错误

  Non-resolvable parent POM: Failure to find .....:pom:1.0.0 in http://myserver.net.intra:9000
/nexus/content/repositories/public/ was cached in the local repository, resolution will not be 
reattempted until the update interval of releases has elapsed or updates are forced and 
'parent.relativePath' points at wrong local POM @ line 6, column 10 

更新:

mvn deploy:deploy-file正在运行并成功上传JAR。但是mvn deploy给出了这个:

   Failed to execute goal on project jurisdiction-business: Could not resolve dependencies for 
project com.a.b.c.d.-business:war:0.0.1-SNAPSHOT: Failure to find om.a.b.c.d.:jar:0.0.1-20121110.071100-3 
in http://myserver.net.intra:9000/nexus/content/repositories/public-snapshots as cached in the 
local repository, resolution will not be reattempted until the update interval of snapshots has 
elapsed or updates are forced

1 个答案:

答案 0 :(得分:3)

通常情况下,在这种情况下,您可以将项目以特定模式签出,并使用/project/parent/relativePath(pom中的XPath)指定父项不在父项目中的父项目的路径库中。

或者,您可以使用聚合器pom并使用聚合器pom构建,因为这将允许从反应器中解析父级。

最简单的方法是在M1上运行mvn install,以便可以从本地缓存中解析它。