mvn install:执行javac失败,但无法解析错误

时间:2011-07-09 04:27:43

标签: maven

这是我第一次尝试使用mavan,当我发出“mvn install”(在vista上运行)时出现以下错误:

[ERROR] Failure executing javac, but could not parse the error:
C:\Users\Kaze Kun\.m2\respository\org\jboss\resteasy\resteasy-jaxrs\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar.  error in opening zip file

我用Google搜索并找到了一些需要设置JAVA_HOME环境变量的线程。但是,这似乎不是我的情况,因为我已经在C:\ Java \ jdk1.6.0_24中设置了我的JAVA_HOME变量。只是想知道问题的原因是什么?

以下是来自maven的错误消息的更详细捕获:

[WARNING] File encoding has not been set, using platform encoding MS932, i.e. bu
ild is platform dependent!
[INFO] Compiling 3 source files to C:\resteasy-jaxrs-2.2.1.GA\examples\oreilly-w
orkbook\ex03_1\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
エラー:C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxrs\2.2.1.
GA\resteasy-jaxrs-2.2.1.GA.jar の読み込みエラーです。error in opening zip file
エラー 1 個

[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:22.828s
[INFO] Finished at: Sat Jul 09 11:11:17 CST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project workbook-ex03_1: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] エラー:C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxr
s\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar の読み込みエラーです。error in opening zi
p file
[ERROR] エラー 1 個
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
C:\resteasy-jaxrs-2.2.1.GA\examples\oreilly-workbook\ex03_1>

1 个答案:

答案 0 :(得分:0)

错误似乎表明resteasy-jaxrs-2.2.1.GA.jar已损坏。

您应该尝试删除此文件

C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxr
s\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar

并重试。

相关问题