1

I've set up a default Maven project in Eclipse but when I run mvn clean test or run Maven test from Eclipse, I get a set of errors:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project gsn-editor: Compilation failure: Compilation failure: [ERROR] error reading C:\Users\owner.m2\repository\org\apache\maven\maven-project\2.2.1\maven-project-2.2.1.jar; invalid END header (bad central directory offset) [ERROR] /C:/Users/owner/git/repository/gsn-editor/gsn-editor/src/model/package-info.java:[25,1] cannot access model [ERROR] invalid END header (bad central directory offset) [ERROR] /C:/Users/owner/git/repository/gsn-editor/gsn-editor/src/model/base/package-info.java:[27,1] cannot access model.base [ERROR] invalid END header (bad central directory offset) [ERROR] /C:/Users/owner/git/repository/gsn-editor/gsn-editor/src/test/TestSacmElement.java:[1,1] cannot access test [ERROR] invalid END header (bad central directory offset) [ERROR] /C:/Users/owner/git/repository/gsn-editor/gsn-editor/src/model/base/SacmElement.java:[3,8] cannot access java [ERROR] invalid END header (bad central directory offset)

What does that all mean, and how do I fix it?

digitig
  • 1,989
  • 3
  • 25
  • 45
  • Strange.. Can you simply try deleting the directory located at `~/.m2`, then try a rebuild? This will cause _all_ artifacts to be re-downloaded. – Matt Clark Jul 03 '18 at 01:15

1 Answers1

3

Your jar files are corrupted. As was said in this post, you can try to figure out which jars are corrupted and delete this jars from .m2 directory, or remove all content of .m2/repository directory if there are a lot of them and then rebuild your application with maven.

biruk1230
  • 3,042
  • 4
  • 16
  • 29