2012-11-09 214 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,這樣它就可以從本地緩存中解析出來。