title: Archive for rquired library cannot be read or is not a valid ZIP file
body: <p>I changed a simple maven project to a maven dynamic web project
  adding this line to my pom.xml:</p>
  
  <pre><code>...
  &lt;packaging&gt;war&lt;/packaging&gt;
  ....
  </code></pre>
  
  <p>I updated my project using <code>maven -&gt; update project</code> The m2e plugin now rewrote the project meta-files (.project and .classpath, as well as files in the .settings folder). </p>
  
  <p>After it was done i got an error in my build path:</p>
  
  <pre><code>Archive for required library: 
  '~/m2/repository/com/orientechnologies/orient-commons/1.6.5/orient-
  commons-1.6.5.pom' in project 'RelationExtraction' 
  cannot be read or is not a valid ZIP
  </code></pre>
  
  <p>The maven dependency:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.orientechnologies&lt;/groupId&gt;
      &lt;artifactId&gt;orientdb-graphdb&lt;/artifactId&gt;
      &lt;version&gt;1.6.5&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Also i cant run my main anymore:</p>
  
  <pre><code>Error: main class myPackage.main.Main could not be found or loaded
  </code></pre>
  
  <p>I tried the following:</p>
  
  <ol>
  <li>I deleted all folders in my <code>~/m2/</code> folder and updated my project again</li>
  <li>I restarted eclipse</li>
  <li>I closed and reopened my project</li>
  <li>I restarted my computer</li>
  </ol>
  
  <p>Inside the folder <code>~/m2/repository/com/orientechnologies/orient-commons/1.6.5/</code> are 
  the following files:</p>
  
  <ul>
  <li>_maven.repositories</li>
  <li>orient-commons-1.6.5.jar</li>
  <li>orient-commons-1.6.5.jar.sha1</li>
  <li>orient-commons-1.6.5.pom</li>
  <li>orient-commons-1.6.5.pom.sha1</li>
  </ul>
  
  <p>I can see in my Maven Dependencies in my project that maven is trying to load the pom and not the jar:</p>
  
  <p><img src="https://i.stack.imgur.com/Hfi37.png" alt="enter image description here"></p>
  
  <p>When i delete </p>
  
  <pre><code>...
  &lt;packaging&gt;war&lt;/packaging&gt;
  ....
  </code></pre>
  
  <p>Maven loads the correct jar and not the pom.</p>
  
  <p><img src="https://i.stack.imgur.com/TW6gI.png" alt="enter image description here"></p>