如何修复Maven中的破损(平针织)链接

时间:2013-02-24 15:00:06

标签: maven jersey

每当我尝试在球衣上运行教程/示例时,我似乎陷入困境。例如,以下两个:

  • // github.com/jesperfj/jax-rs-upload-file.git
  • // github.com/jamesward/jaxrsbars.git

更糟糕的是,错误似乎取决于我的存储库,即运行其他(类似)项目的历史记录,例如以下Maven Archetype:

  • com.sun.jersey.archetypes:Jersey的快速启动-grizzly2

我试图在下面详细描述我的发现。我的问题:

  • 我(Maven和Jersey的新手)是否希望修复我不理解的项目上的断链,如果是,那么典型的策略是什么?
  • 导致这些" CHECKSUM FAILED"错误?
  • 这是针对运动衫的典型问题和/或是否与描述here的SUN问题有关?

任何有关使示例工作或更好地理解出错的帮助都非常感谢?

我做了什么:

我首先删除我的本地.m2 / repository并在jax-rs-upload-example上运行mvn package

(...)
Downloading: http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom
185b downloaded  (jvnet-parent-1.pom)
[WARNING] *** CHECKSUM FAILED 
(...)
[INFO] Error building POM (may not be this project's POM).
(...)
Reason: Cannot find parent: net.java:jvnet-parent for project: com.sun.jersey:jersey-project:pom:1.9.1 for project com.sun.jersey:jersey-project:pom:1.9.1

当我在另一个示例或quickstart-archetype上执行mvn package时,我看到类似的net.java.jvnet-parent错误。但是,如果我然后删除我的存储库,并重建quickstart-archetype,它现在可以构建并运行。如果我现在构建这两个示例,我再次看到一些CHECKSUM FAILED消息,最终导致以下错误:

JAX-RS-上传

[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

error: error reading /home/rafel/.m2/repository/com/sun/jersey/jersey-server/1.9.1/jersey-server-1.9.1.jar; error in opening zip file
error: error reading /home/rafel/.m2/repository/com/sun/jersey/jersey-core/1.9.1/jersey-core-1.9.1.jar; error in opening zip file

jaxrsbars

[INFO] Compilation failure

error: error reading /home/rafel/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar; error in opening zip file
error: error reading /home/rafel/.m2/repository/org/glassfish/hk2/external/javax.inject/1.6.32/javax.inject-1.6.32.jar; error in opening zip file
error: error reading /home/rafel/.m2/repository/org/glassfish/hk2/external/asm-all-repackaged/1.6.32/asm-all-repackaged-1.6.32.jar; error in opening zip file

0 个答案:

没有答案