Yesterday I was setting up my new Macbook Pro 15inch with all my Crunchify Tutorials. I usually use Maven all over the place. Without maven pom.xml file I can’t even start working on my project. Maven is so convenient tool for building Java project, I wouldn’t think project without it.
It took long time to import all of my Java Projects to new Eclipse Workspace. While importing all of my Maven Projects to Eclipse, somehow few of the .jar files got corrupted. After import finish I noticed few errors under
Problems tab in Eclipse.
Corrupt imported file by Maven caused below error:
Here is a complete message:
Description Resource Path Type Location
Archive for required library: '/Users/app/.m2/repository/org/springframework/spring-webmvc/4.1.1.RELEASE/spring-webmvc-4.1.1.RELEASE.jar' in project 'CrunchifySpringMVCTutorial' cannot be read or is not a valid ZIP file CrunchifySpringMVCTutorial Build Path Problem Build path
How to identify an issue?
On you computer, visit path:
/Users/app/.m2/repository/org/springframework/spring-webmvc/4.1.1.RELEASE. You should be able to tell by looking at
spring-webmvc-4.1.1.RELEASE.jar file size. In my case it was just
32 bytes. File shouldn’t be that small.
How to fix an issue?
There are multiple solutions to this:
- Close/Open the project in Eclipse. Error may go away – didn’t work for me.
- Exit/Open Eclipse. Error may go away – didn’t work for me.
- In my case, I’ve
4.1.1.RELEASEas mentioned in above image.
- Then right click on project
How to verify if issue is resolved now?
Once you perform Update Project… steps in Eclipse, Eclipse would re-download the
version 4.1.1 for your and you should see correct file this time. It was
775 KB this time.
Join the Discussion
Share & leave us some comments on what you think about this topic or if you like to add something.