Maven : error in opening zip file when running maven

后端 未结 17 2159
-上瘾入骨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 03:39

    Probably, contents of the JAR files in your local .m2 repository are HTML saying "301 Moved Permanently". It seems that mvn does not handle "301 Moved Permanently" properly as expected. In such a case, download the JAR files manually from somewhere (the central repository, for example) and put them into your .m2 repository.

    See also:

    asm-3.1.jar; error in opening zip file
    http://darutk-oboegaki.blogspot.jp/2012/07/asm-31jar-error-in-opening-zip-file.html

    0 讨论(0)
  • 2020-11-29 03:39

    Try to remove your repository in /.m2/repository/ and then do a mvn clean install to download the files again.

    0 讨论(0)
  • 2020-11-29 03:40

    I also encountered the same problem, my problem has been resolved. The solution is:

    According to error information being given, to find the corresponding jar in maven repository and deleted. Then executed mvn install command after deleting.

    0 讨论(0)
  • 2020-11-29 03:44

    For me I should change the .m2 repo in the settings.xml file with another one because in Mac maven can't create a folder that start with point(.)

    to solve that, open your maven/version/conf/settings.xml and specify the location of your repo folder like this :

    <localRepository>../repo</localRepository>
    

    don't forget to change it also in your IDE, in eclipse go to : Windows > Preferences > Maven > User Settings > Global Settings, and navigate to your settings.xml.

    clean install your project.

    hope this will help you.

    0 讨论(0)
  • 2020-11-29 03:44

    You could also check if the required certificates are installed to make sure that it allows the dependencies to be downloaded.

    0 讨论(0)
  • 2020-11-29 03:49

    This error sometimes occurs. The files becomes corrupt. A quick solution thats works for me, is:

    • Go to your local repository (in general /.m2/) in your case I see that is C:\Users\suresh.m2)
    • Search for the packages that makes conflicts (in general go to repository/org) and delete it
    • Try again to install it

    With that you force to get the actual files

    good luck with that!

    0 讨论(0)
提交回复
热议问题