1

每当我尝试在球衣上运行教程/示例时,我似乎都被卡住了。比如下面两个:

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

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

  • com.sun.jersey.archetypes:jersey-quickstart-grizzly2

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

  • 我(Maven 和 Jersey 的新手)能否希望修复我不理解的项目中的断开链接,如果可以,典型的策略是什么?
  • 是什么导致这些“CHECKSUM FAILED”错误?
  • 这是球衣的典型问题和/或与此处描述的 SUN 问题有关吗?

非常感谢您在使示例正常工作或更好地理解出了什么问题方面的任何帮助?

我做了什么:

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

(...)
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

然后,当我mvn package对另一个示例或 quickstart-archetype 执行操作时,我会看到类似的net.java.jvnet-parent错误。但是,如果我随后删除我的存储库并重新构建快速入门原型,它现在可以构建并运行。如果我现在构建这两个示例,我会再次看到许多 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

贾克斯酒吧

[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
4

0 回答 0