title: Upgrading Jackson maven dependency issues
body: <p>I'm trying to upgrade Jackson from 1.9.2 to 2.5.4 in my maven managed Spring web app. It all works just dandy, but blows up in one obscure corner where we have a windows azure integration.</p>
  
  <p>The (I believe) relevant parts of the pom.xml are:</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
          &lt;version&gt;2.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;version&gt;2.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.jaxrs&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-jaxrs-json-provider&lt;/artifactId&gt;
          &lt;version&gt;2.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.module&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-module-jaxb-annotations&lt;/artifactId&gt;
          &lt;version&gt;2.5.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-datatype-joda&lt;/artifactId&gt;
          &lt;version&gt;2.5.4&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>And:</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
          &lt;artifactId&gt;azure-servicebus&lt;/artifactId&gt;
          &lt;version&gt;0.7.0&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
          &lt;artifactId&gt;azure-storage&lt;/artifactId&gt;
          &lt;version&gt;2.1.0&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>The exception at runtime is: </p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JsonUnwrapped
          at org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector.shouldUnwrapProperty(JacksonAnnotationIntrospector.java:153) ~[jackson-mapper-asl-
  1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.deser.BeanDeserializer._resolveUnwrappedProperty(BeanDeserializer.java:515) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.deser.BeanDeserializer.resolve(BeanDeserializer.java:384) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.deser.StdDeserializerProvider._resolveDeserializer(StdDeserializerProvider.java:438) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCache2(StdDeserializerProvider.java:383) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:321) ~[jackson-mapper-asl-1.9.2
  .jar:1.9.2]
          at org.codehaus.jackson.map.deser.StdDeserializerProvider.findValueDeserializer(StdDeserializerProvider.java:167) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.deser.StdDeserializerProvider.findTypedValueDeserializer(StdDeserializerProvider.java:188) ~[jackson-mapper-asl-1.9.2.jar:1
  .9.2]
          at org.codehaus.jackson.map.ObjectMapper._findRootDeserializer(ObjectMapper.java:2820) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2719) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1926) ~[jackson-mapper-asl-1.9.2.jar:1.9.2]
          at com.microsoft.windowsazure.services.servicebus.implementation.BrokerPropertiesMapper.fromString(BrokerPropertiesMapper.java:37) ~[azure-servicebus-0
  .7.0.jar:na]
          at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusRestProxy.receiveMessage(ServiceBusRestProxy.java:259) ~[azure-servicebus-0.
  7.0.jar:na]
          at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusRestProxy.receiveQueueMessage(ServiceBusRestProxy.java:216) ~[azure-serviceb
  us-0.7.0.jar:na]
          at com.microsoft.windowsazure.services.servicebus.implementation.ServiceBusExceptionProcessor.receiveQueueMessage(ServiceBusExceptionProcessor.java:137
  ) ~[azure-servicebus-0.7.0.jar:na]
  </code></pre>
  
  <p>A big part of what I don't understand is why Maven doesn't simply pull in the right dependency for Azure -- it's not technically a dependency convergence issue because the groupId and everything have changed from <code>org.codehaus</code> to <code>com.fasterxml</code>. When I switched the dependency to runtime scope, the error disappeared, but then our IDEs complains that the dependency isn't available, which is prohibitive.</p>
  
  <p>I've tried including the old versions explicitly, and the error doesn't occur.</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-xc&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I also tried exclusions:</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;!-- Honeywell: AZURE --&gt;
      &lt;!-- Don't let it pull in old jackson --&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
        &lt;artifactId&gt;azure-servicebus&lt;/artifactId&gt;
        &lt;version&gt;0.7.0&lt;/version&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
            &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
          &lt;/exclusion&gt;
          &lt;exclusion&gt;
            &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
            &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;/exclusion&gt;
          &lt;exclusion&gt;
            &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
            &lt;artifactId&gt;jackson-xc&lt;/artifactId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
          &lt;artifactId&gt;azure-storage&lt;/artifactId&gt;
          &lt;version&gt;2.1.0&lt;/version&gt;
          &lt;exclusions&gt;
            &lt;exclusion&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
            &lt;/exclusion&gt;
            &lt;exclusion&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
            &lt;/exclusion&gt;
            &lt;exclusion&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-xc&lt;/artifactId&gt;
            &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Why can't mvn handle this situation? What's the best way to remedy it?</p>