title: How to debug conflicting dependencies in Maven project
body: <p>When I build my Maven-managed Java project, two versions of the same artifact are installed into the build (a war file).  I am pretty sure that it doesn't matter, but the artifact in question is <strong>com.fasterxml.jackson.core:jackson-annotations</strong> versions <strong>2.7.3 and 2.9.7</strong>.</p>
  <p>When I run <strong>mvn dependency:tree -Dverbose</strong>, there are no occurrences of <strong>jackson-annotations:2.7.3</strong>, indeed, there are no occurrences of the string <strong>2.7.3</strong> anywhere in the resulting output.</p>
  <p>My question is, how do I proceed to debug this problem?  I believed that the <strong>dependency:tree</strong> goal would give me the full set of transitive dependencies.  Is this belief correct?  If not, what would?</p>
  <p>For the record, on my local machine the new version of the library is found and everything works, but when deployed to another machine the deployment is broken because that machine finds the old version of the library.</p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;mygroup&lt;/groupId&gt;
      &lt;artifactId&gt;something&lt;/artifactId&gt;
      &lt;version&gt;0.0.48&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mygroup&lt;/groupId&gt;
          &lt;artifactId&gt;a&lt;/artifactId&gt;
          &lt;version&gt;0.0.34&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;mygroup&lt;/groupId&gt;
          &lt;artifactId&gt;b&lt;/artifactId&gt;
          &lt;version&gt;0.0.36&lt;/version&gt;
      &lt;/dependency&gt;
  
       &lt;!-- Jersey --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
          &lt;version&gt;2.1.12&lt;/version&gt;
          &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;3.0.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.test-framework&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-test-framework-core&lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-container-servlet&lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-container-servlet-core&lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Jersey Test Framework --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
       &lt;dependency&gt;
          &lt;groupId&gt;
              org.glassfish.jersey.test-framework.providers
          &lt;/groupId&gt;
          &lt;artifactId&gt;
              jersey-test-framework-provider-grizzly2
          &lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
          &lt;version&gt;2.25.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;myrepository&lt;/id&gt;
          &lt;name&gt;My repository name&lt;/name&gt;
          &lt;url&gt;myrepositoryurl&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  
  &lt;build&gt;
      &lt;sourceDirectory&gt;src/main&lt;/sourceDirectory&gt;
      &lt;testSourceDirectory&gt;src/test&lt;/testSourceDirectory&gt;
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;.&lt;/directory&gt;
              &lt;includes&gt;
                  &lt;include&gt;pom.xml&lt;/include&gt;
              &lt;/includes&gt;
              &lt;filtering&gt;true&lt;/filtering&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.7.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.8&lt;/source&gt;
                  &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
     &lt;/plugins&gt;
   &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>