2012-06-12 117 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 /阳光/球衣让先前下载的罐子或劲歌被删除 并重新构建项目。它新鲜地下载了所有东西。