skip
skip

Reputation: 12683

cannot read zip file entry

I have a maven project which is giving me BUILD FAILURE with the following error when I try to run mvn install:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project core: Compilation failure: Compilation failure:
[ERROR] error: error reading C:\Users\lawson\.m2\repository\org\springframework\spring-beans\3.0.5.RELEASE\spring-beans-3.0.5.RELEASE.jar; cannot read zip file entry

I already see all the dependencies under Maven Dependencies in my project in Eclipse. Could someone help me understand why am I getting this error?

Thanks.

Upvotes: 0

Views: 3257

Answers (2)

David Gorsline
David Gorsline

Reputation: 5018

It looks like your local repository entry for spring-beans is corrupt in some way. You may be able to reinstall it with the mvn install:install-file goal. See http://maven.apache.org/plugins/maven-install-plugin/usage.html.

Upvotes: 1

khmarbaise
khmarbaise

Reputation: 97527

I would suggest to first try to delete the contents of the folder: C:\Users\lawson.m2\repository\org\springframework and afterward redo the mvn clean package of your project. Furthermore i would suggest to update the maven-compiler-plugin version via

 <build>
   <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.4</version>
        </plugin>
      </plugins>
    </pluginManagement>
 </build>

It looks like you have downloaded a jar file which was corrupted.

Upvotes: 4

Related Questions