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

后端 未结 23 1763
感情败类
感情败类 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:48

    For Googlers:

    In my case I had accidentally manually added a Java class to the build path while poking around Eclipse. By taking a look at the 'Configure Build Path...> Libraries I removed the culprit class and now only have the

    • JRE System Library
    • Maven Dependencies

    and nothing is complaining.

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

    I faced this problem. I had "Archive for required library spring-boot-devtools cannot be read or is not a valid ZIP file" and the solution was like that:- 1- determine the dependencies names that have problems(for may case it is spring-boot-devtools). 2- close eclipse. 3- search in your .m2 file on these dependencies(by name). 4- delete these folders. 5- reopen eclipse and let maven rebuild your dependencies again.

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

    I was using Eclipse as IDE and I was getting very same error. I had to do Project->Maven->Update Project. Select all the checkboxes below except "offline" esp. the one "Force update of snapshots/releases" and click OK. Did the Clean Build for the Project again.

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

    Ok, I had the same problem with STS on a mac and solved it by deleting all the files in repository folder and from the STS IDE click on the project and then Maven -> Update project. Give it a couple of minutes to download all the dependencies and the problem is solved.

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

    Just had this problem on Indigo SR2. It popped up after I removed a superfluous jar from the classpath (build path). Restarting Eclipse didn't help. Added back the jar to the build path...error went away. Removed the jar once again, and this time I was spared from another complaint.

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

    This could be due to you have added spring-licence.txt file to your web app libraries.

    I had similar issue and resolved after removing that text file. In libraries it will expect jar file only.

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