gpt4 book ai didi

maven - mvn install : Failure executing javac, 但无法解析错误

转载 作者:行者123 更新时间:2023-12-02 05:10:05 24 4
gpt4 key购买 nike

这是我第一次尝试使用 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

我用谷歌搜索并找到了一些关于需要设置 JAVA_HOME 环境变量的帖子。然而,这对我来说似乎不是这种情况,因为我已经将我的 JAVA_HOME 变量设置在 C:\Java\jdk1.6.0_24。只是想知道问题的原因是什么?

下面是从 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>

最佳答案

错误似乎表明 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

并重试。

关于maven - mvn install : Failure executing javac, 但无法解析错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6632710/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com