I am new for Maven ..I am trying to create maven project for springMVC+Hiberante but I am getting lot of errors..can any one slove my problem please check my pom.xml for be
This looks like a problem of corrupt jars being downloaded. I have seen this happen only when I use eclipse. Here's what I did to get rid of this problem:
Then use the command prompt to force download jars and build
mvn clean install
You have to remove all jars from your .m2 repository and run maven project again: if you have war already so you have to delete all jars and download again.
Delete contents from .m2\repository. from your directory
mvn clean install
It is important to remember that what is invalid is useless (e.g. corrupted), so:
I had similar problem and it had nothing to do with revisioning or Maven itself... The problem was corrupted JAR ( Eclipse with Maven plugin does not work with latest revisions, but works with older ones).
Good luck!
I was getting the same error while running the mvn clean install command
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project MongoModule: Compilation failure
[ERROR] error: error reading /home/radium/.m2/repository/org/mongodb/mongo-java-driver/3.2.2/mongo-java-driver-3.2.2.jar; invalid LOC header (bad signature)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project MongoModule: Compilation failure
error: error reading /home/radium/.m2/repository/org/mongodb/mongo-java-driver/3.2.2/mongo-java-driver-3.2.2.jar; invalid LOC header (bad signature)
Then I deleted the mongo-java-driver-3.2.2.jar file from the maven repo and re run the maven build command, which forced the maven to re download the jar and successfully build the project.
I know this is an old thread, but I have faced the same problem (albeit with a different jar file).
In eclipse, when a maven build fails because of corrupt LOC header, a warning is generated (in my case it was spring-tx-3.0.3.RELEASE.pom but could be any other maven dependancy).
Go up in build stack-trace and figure out which JAR is failing, delete the corresponding repo folder from .m2 repositories and rebuild, that should do the trick.
The reason is a corrupt jar file.
Use mvn dependency:purge-local-repository
to delete und reload your dependencies in your local maven repository.