2012-06-12 107 views
-2

我在Maven構建上始終得到以下錯誤。我無法弄清楚發生了什麼事。技術解釋是什麼?maven構建失敗glassfish依賴

Downloading: http://maven.glassfish.org/content/groups/glassfish/com/sun/jersey/jersey-project/1.2/jersey-project-1.2.pom 
185b downloaded (jersey-project-1.2.pom) 
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = '<html> 
<head><title>301' - RETRYING 
Downloading: http://maven.glassfish.org/content/groups/glassfish/com/sun/jersey/jersey-project/1.2/jersey-project-1.2.pom 
185b downloaded (jersey-project-1.2.pom) 
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = '<html> 
<head><title>301' - IGNORING 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Error building POM (may not be this project's POM). 


Project ID: null:jersey-server:bundle:null 

Reason: Cannot find parent: com.sun.jersey:jersey-project for project: null:jersey-server:bundle:null for project null:jersey-server:bundle:null 


[INFO] ------------------------------------------------------------------------ 
[INFO] Trace 
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'com.sun.jersey:jersey-server:jar': Cannot find parent: com.sun.jersey:jersey-project for project: null:jersey-server:bundle:null for project null:jersey-server:bundle:null 
    com.sun.jersey:jersey-server:jar:1.2 
+1

也許你可以告訴我們你的'pom.xml',讓我們更容易找出問題所在? – maba

+0

您必須爲您提供''pom.xml'和'settings.xml'中的存儲庫設置。 – Oliver

回答

0

我遇到了同樣的問題,事實上,在GlassFish庫一直301.所以,如果我們可以先使用中央reposity,就不會有這些問題。現在我的方法是修改使用glassfish存儲庫的pom文件。刪除一些關於存儲庫的信息。然後它可以這次工作。但很快又出現了另一個問題,那麼許多pom包含玻璃魚。我修改下一個。哦,太多了。

0

請檢查你的球衣項目POM文件在你的本地倉庫
〜/平方米/庫/ COM /陽光/汗布/球衣項目/ 1.2 /新澤西州項目1.2.pom C:\ Users \用戶。 2 \庫\ COM \太陽\球衣\球衣項目\ 1.2 \球衣項目 - 1.2.pom

的POM內容可能不正確,就像下面,

<html> 
<head><title>301 Moved Permanently</title></head> 
<body bgcolor="white"> 
<center><h1>301 Moved Permanently</h1></center> 
<hr><center>nginx/0.6.39</center> 
</body> 
</html 

只刪除POM文件(或剛剛退出球衣目錄),並重新嘗試,您將修復此問題

0

參考此答案 https://stackoverflow.com/a/27248395/1122841

至於有建議我加鏡像Settings.XML中的細節(行家的config目錄內) 刪除.m2目錄/庫/ COM /陽光/球衣讓先前下載的罐子或勁歌被刪除 並重新構建項目。它新鮮地下載了所有東西。