Maven : error in opening zip file when running maven

后端 未结 17 2189
-上瘾入骨i
-上瘾入骨i 2020-11-29 03:28
[ERROR] error: error reading C:\\Users\\suresh\\.m2\\repository\\org\\jdom\\jdom\\1.1\\jdom-1.1.jar; error in opening zip file
[ERROR] error: error reading C:\\Users         


        
17条回答
  •  佛祖请我去吃肉
    2020-11-29 04:02

    Accidently I found a simple workaroud to this issue. Running Maven with -X option forces it to try other servers to download source code. Instead of trash HTML inside some jar files there is correct content.

    mvn clean install -X > d:\log.txt
    

    And in the log file you find messages like these:

    Downloading: https://repository.apache.org/content/groups/public/org/apache/axis2/mex/1.6.1-wso2v2/mex-1.6.1-wso2v2-impl.jar
    [DEBUG] Writing resolution tracking file D:\wso2_local_repository\org\apache\axis2\mex\1.6.1-wso2v2\mex-1.6.1-wso2v2-impl.jar.lastUpdated
    Downloading: http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/axis2/mex/1.6.1-wso2v2/mex-1.6.1-wso2v2-impl.jar
    

    You see, Maven switched repository.apache.org to maven.wso2.org when it encountered a download problem. So the following error is now gone:

    [ERROR] error: error reading D:\wso2_local_repository\org\apache\axis2\mex\1.6.1-wso2v2\mex-1.6.1-wso2v2-impl.jar; error in opening zip file
    

提交回复
热议问题