每当我尝试在球衣上运行教程/示例时,我似乎陷入困境。例如,以下两个:
更糟糕的是,错误似乎取决于我的存储库,即运行其他(类似)项目的历史记录,例如以下Maven Archetype:
我试图在下面详细描述我的发现。我的问题:
任何有关使示例工作或更好地理解出错的帮助都非常感谢?
我做了什么:
我首先删除我的本地.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