title: How to exclude cyclic deprecated dependencies in maven without killing the dependencies completely?
body: <p>I have a case that I have the following cyclic dependencies in maven:</p>
  
  <pre><code>JAR A version 1.1 depends on JAR B version 1.0
  JAR B version 1.1 depends on JAR A version 1.0
  </code></pre>
  
  <p>For some reason that I don't know, Maven brings all the 4 JARs: A 1.0, A 1.1, B 1.0 and B 1.1, which results in a classpath conflict.</p>
  
  <p>This really sucks. I already ask the developers of both JARs to fix this, however I can't simply sit and wait for the day that they decide to fix this.</p>
  
  <p>I tried this:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;groupA&lt;/groupId&gt;
      &lt;artifactId&gt;artifactA&lt;/artifactId&gt;
      &lt;version&gt;1.1&lt;/version&gt;
      &lt;type&gt;pom&lt;/type&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
      &lt;exclusions&gt;
          &lt;exclusion&gt;
              &lt;groupId&gt;groupB&lt;/groupId&gt;
              &lt;artifactId&gt;artifactB&lt;/artifactId&gt;
          &lt;/exclusion&gt;
      &lt;/exclusions&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;groupB&lt;/groupId&gt;
      &lt;artifactId&gt;artifactB&lt;/artifactId&gt;
      &lt;version&gt;1.1&lt;/version&gt;
      &lt;type&gt;pom&lt;/type&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
      &lt;exclusions&gt;
          &lt;exclusion&gt;
              &lt;groupId&gt;groupA&lt;/groupId&gt;
              &lt;artifactId&gt;artifactA&lt;/artifactId&gt;
          &lt;/exclusion&gt;
      &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>The result is that maven excludes all of the JARs as if none dependency were added, and the project does not compiles because there are missing classes.</p>
  
  <p>So, other than just asking both JARs developers to solve this, what can I do? How can I import both the new dependencies while leaving out both the old ones?</p>