title: How can I tell Maven to add the dependencies of my war on the test classpath?
body: <p>I have built a set of servlets and bundled them all in a WAR.
  I have built a client library and bundled all its classes in a JAR.</p>
  
  <p>I would like to test the client library against the WAR. I tried this :</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.company.myproject&lt;/groupId&gt;
          &lt;artifactId&gt;the-war-of-myproject&lt;/artifactId&gt;
          &lt;version&gt;1.1.0&lt;/version&gt;
          &lt;type&gt;war&lt;/type&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Unfortunately, it's not possible to add a WAR as a dependency in a pom.xml.
  How should I do ?</p>
  
  <p><strong>Eclipse Indigo</strong><br>
  <strong>JDK 6</strong><br>
  <strong>Maven 3</strong></p>
  
  <p><strong>EDIT:</strong><br>
  Based on wemu's comment, I have decided to move the classes required by both the WAR and the JAR into a common dependency.</p>