Compiler error “archive for required library could not be read” - Spring Tool Suite

后端 未结 23 1761
感情败类
感情败类 2020-12-01 01:27

I am starting to configure my development environment and I am using Spring Tool Suite 2.8.1 along with m2E 1.01.

As far as I can tell, since this is a Maven Project

相关标签:
23条回答
  • 2020-12-01 01:40

    I was facing the same problem with my project.

    My project was not able to find this archive: -

    C:\Users\rakeshnarang\.m2\repository\org\hibernate\hibernate-core\5.3.7.Final
    

    I went to this directory and deleted this folder.

    Went back to eclipse and hit ALT + F5 to update the project.

    The jar file was downloaded again and the problem was solved.

    You should try this.

    0 讨论(0)
  • 2020-12-01 01:42

    none of the solutions above helped my problem. I've resolved it by deleting all files in {projectworkspace}/.metadata folder AND in {location}/.m2 folder and let eclipse download every single thing again. Hope this helps someone, cheers!

    0 讨论(0)
  • 2020-12-01 01:44

    Delete corrupted files from your local .m2 repository and Ctrl+F5 (Update Maven Project) in Eclipse/STS. It'll download and install these files.

    0 讨论(0)
  • 2020-12-01 01:44

    Read the issue in Problems section,identify which dependency not able to read, then go the maven repository .m2\repository -> 1)check the dependencies and delete it from the folder 2)go to STS/Eclipse -> click on maven -> update project ->select the force update of snapshots/releases and click on ok.

    or delete the dependencies from the .m2/repository and rebuild the maven --> update the maven project

    0 讨论(0)
  • 2020-12-01 01:46

    Indeed IDEs often cache the local repository (Eclipse does something similar, and I have to relaunch Eclipse).

    One ugly maven behavior you might encounter is that if you declare a dependency before you actually install it, maven will create an empty version of the missing dependency (folder with metadata but no jar), and you will have to manually clean your .m2 repository.

    Third, an installed archive (jar...) can get corrupted, so try to open it with any archive tool (7zip...) to test it, and delete the whole folder if the archive is corrupted.

    0 讨论(0)
  • 2020-12-01 01:47

    This happens when Eclipse screws up. To fix it, delete all the files in:

    workspace/.metadata/.plugins/org.eclipse.jdt.core
    
    0 讨论(0)
提交回复
热议问题