2012-11-09 217 views
2

我正在运行maven 3.0.4。我能够成功运行清洁,打包,安装。但是当我运行mvn deploy,我得到一个错误:Maven部署失败

我正在测试这个有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

'mvn deploy:deploy-file'工作吗? – artbristol

+0

不能..同样的错误..但我已经做了一些更多的配置,看起来像等等在POM中是错误的 – user1652654

+0

你能用来自Nexus日志的信息更新问题吗? – artbristol

回答

3

通常在这种情况下,你将有项目在对方旁边一个特定的模式签出,并使用/project/parent/relativePath(POM中的XPath)当指定父项目的路径父代不在存储库中。

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

最简单的就是在M1上运行mvn install,这样它就可以从本地缓存中解析出来。