Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to execute goal & Hibernate invalid LOC header (bad signature)

i try to build my Project with maven (goal: package clean) but i get the error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project minimalistic-mvc-example: Compilation failure
[ERROR] error: error reading /home/chris/.m2/repository/org/hibernate/hibernate-core/4.1.9.Final/hibernate-core-4.1.9.Final.jar; invalid LOC header (bad signature)
[ERROR] -> [Help 1]
like image 764
Furtano Avatar asked Dec 23 '12 16:12

Furtano


People also ask

What is Maven Mojofailureexception?

Unlike many other errors, this exception is not generated by the Maven core itself but by a plugin. As a rule of thumb, plugins use this error to signal a failure of the build because there is something wrong with the dependencies or sources of a project, e.g. a compilation or a test failure.

What command can you use to run the compile goal of the compiler plugin?

As both goals of the compiler plugin are automatically bound to phases in the Maven default lifecycle, we can execute these goals with the commands mvn compile and mvn test-compile.

Where do I put plugins in POM XML?

They execute during the build process and should be configured in the <build/> element of pom. xml. They execute during the site generation process and they should be configured in the <reporting/> element of the pom.


1 Answers

Seems like your local jar file is corrupted. Delete your local Maven repo and try again. This will force maven to download the jar again, from remote repo.

In windows by default local maven repo will be in C:\Users\username\.m2\repository

like image 196
Subin Sebastian Avatar answered Oct 18 '22 16:10

Subin Sebastian