[maven] Maven : error in opening zip file when running maven

This error occurs because of some file corruption. But we don't need to delete whole .m2 folder. Instead find which jar files get corrupted by looking at the error message in the console. And delete only the folders which contains those jar files.

Like in the question :

  1. C:\Users\suresh\.m2\repository\org\jdom\jdom\
  2. C:\Users\suresh\.m2\repository\javax\servlet\servlet-api\
  3. C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-rt-bindings-http
  4. C:\Users\suresh\.m2\repository\org\codehaus\jra\jra
  5. C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-api
  6. C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-common-utilities

Delete these folders. Then run.

mvn clean install -U