title: eclipse maven error: Archive for required library in project cannot be read or is not a valid ZIP file
body: <p>In an eclipse maven project using spring web mvc, I am getting the following error in the Markers tab:  </p>
  
  <pre><code>Archive for required library: 'D:/mypath/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar' in project 'DocumentManager' cannot be read or is not a valid ZIP file
  </code></pre>
  
  <p>I have checked, and the jar file is in fact present in the url indicated.  I even copied a backup of the jar to overwrite the jar file in that location, but that did not get rid of the error either. I forced maven to update, which did not solve the problem.  I also restarted eclipse to no effect.</p>
  
  <p>At one point, jta-1.0.1B.jar had been jta-1.0.1B.jar.LatestUpdate, so I shortened the name to jta-1.0.1B.jar </p>
  
  <p>In pom.xml, the location of the error message is line 2, which reads as follows:  </p>
  
  <pre><code>xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;  
  </code></pre>
  
  <p>When I download jta-1.0.1B.jar manually from <a href="http://download.java.net/maven/2/javax/transaction/jta/1.0.1B/" rel="nofollow noreferrer">this url</a>, the error in pom.xml goes away but is replaced with new errors in .java class files indicating that 5 methods of the Document class are not valid.  </p>
  
  <p>I read <a href="https://stackoverflow.com/questions/19086523/missing-artifact-javax-transactionjtajar1-0-1b-issue-was-different-as-you-m">this</a> and <a href="https://stackoverflow.com/questions/9003298/missing-javax-transaction-jta-artifact">this</a>, but I am not using struts, I am already including 3.3.2.ga of hibernate, and I do not have a repository tag in pom.xml (which <a href="https://stackoverflow.com/questions/19086523/missing-artifact-javax-transactionjtajar1-0-1b-issue-was-different-as-you-m">this</a> said did not even solve the problem anyway), so I do not think this is a duplicate.  </p>
  
  <p>Can anyone suggest a way to fix this problem?  If I need a repository tag, where do I put it?  And what else do I change to accommodate its addition?</p>
  
  <p>For anyone who is curious, my pom.xml is included for reference as follows:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;description&gt;&lt;/description&gt;
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.5&lt;/source&gt;
            &lt;target&gt;1.5&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.0.1&lt;/version&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
        &lt;version&gt;2.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
        &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
        &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
        &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
        &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
        &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;taglibs&lt;/groupId&gt;
        &lt;artifactId&gt;standard&lt;/artifactId&gt;
        &lt;version&gt;1.1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;jstl&lt;/artifactId&gt;
        &lt;version&gt;1.1.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
        &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
        &lt;version&gt;3.3.2.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;mysql&lt;/groupId&gt;
        &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
        &lt;version&gt;5.1.10&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
        &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
        &lt;version&gt;20030825.184428&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-pool&lt;/groupId&gt;
        &lt;artifactId&gt;commons-pool&lt;/artifactId&gt;
        &lt;version&gt;1.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
        &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
        &lt;version&gt;1.2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-io&lt;/groupId&gt;
        &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
        &lt;version&gt;1.3&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;!-- dependency to fix JSPServletException --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;6.0.32&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;               
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;properties&gt;
      &lt;org.springframework.version&gt;3.2.4.RELEASE&lt;/org.springframework.version&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
    &lt;groupId&gt;DocumentManager&lt;/groupId&gt;
    &lt;artifactId&gt;DocumentManager&lt;/artifactId&gt;
  &lt;/project&gt;  
  </code></pre>