title: Maven - Detect Multiple Versions of the Same Dependency
body: <p>I just experienced a case of two direct dependencies of my maven project having two different versions of a particular transitive dependency.</p>
  
  <p>In my particular case I had direct dependencies on the following:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.jclouds.driver&lt;/groupId&gt;
          &lt;artifactId&gt;jclouds-sshj&lt;/artifactId&gt;
          &lt;version&gt;${jclouds.version}&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
          &lt;artifactId&gt;mule-module-jersey&lt;/artifactId&gt;
          &lt;version&gt;${mule.version}&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Both of these dependencies had a (deep) transitive dependency on com.sun.jersey:jersey-core, but with different versions for each.  Maven didn't fail on this or even warn (or if it did, I never saw it!) that such a thing was happening... and as such I never noticed it until debugging a problem that happened when the version of jersey-core brought in by the jclouds dependency caused some things to break.  </p>
  
  <p>Is there a maven plugin or some other tool that exists that will detect this sort of deep transitive dependency overriding and at least warn the user (or fail the maven execution) if it detects such a collision... even if the default maven behavior is to just pick the first version that appears when resolving dependencies?</p>