title: Maven Dependency error in Eclipse
body: <p>I have a war artefact and I need use some of their classes from a jar.
  I can't move the classes to another project, then I deploy the classes and resources included in my webapp as an "attached" artifact using the following configuration:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;configuration&gt;
          &lt;attachClasses&gt;true&lt;/attachClasses&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>This will result in two artifacts being deployed: mywebapp-1.0-SNAPSHOT.war and mywebapp-1.0-SNAPSHOT-classes.jar.</p>
  
  <p>To use those classes I Referencing the artifact as follows:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;mygroup&lt;/groupId&gt;
          &lt;artifactId&gt;mywebapp&lt;/artifactId&gt;
          &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;classifier&gt;classes&lt;/classifier&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>When I compiled from Jenkins everything works correctly, but when I run the tests locally from Eclipse can not find the reference classes. (java.lang.NoClassDefFoundError)</p>
  
  <p>I think it might be a bug in the maven eclipse plugin, someone has any idea that can be happening?</p>