title: Why does Maven download different versions of Spring artifacts?
body: <p>In my Maven project I have defined a bunch of Spring dependencies, and I notice that in some cases it will choose different versions of the artifacts even though they are specified identically in my pom.xml.</p>
  
  <p>This is an outline of <code>mvn dependency:tree</code></p>
  
  <pre><code>[INFO] com.vrutberg.blogping:blogping:war:1.0-SNAPSHOT
  [INFO] +- junit:junit:jar:4.7:test
  [INFO] +- javax.servlet:servlet-api:jar:2.4:compile
  [INFO] +- com.sun.jersey:jersey-server:jar:1.12:compile
  [INFO] |  +- asm:asm:jar:3.1:compile
  [INFO] |  \- com.sun.jersey:jersey-core:jar:1.12:compile
  [INFO] +- com.sun.jersey:jersey-bundle:jar:1.12:compile
  [INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
  [INFO] +- org.springframework:spring-core:jar:3.0.0.RC3:compile
  [INFO] +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
  [INFO] +- org.springframework:spring-beans:jar:3.0.0.RC3:compile
  [INFO] +- org.springframework:spring-aop:jar:3.0.0.RC3:compile
  [INFO] +- org.springframework:spring-context:jar:3.0.0.RC3:compile
  [INFO] +- org.springframework:spring-context-support:jar:3.0.5.RELEASE:compile
  [INFO] +- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
  [INFO] |  \- aopalliance:aopalliance:jar:1.0:compile
  [INFO] +- org.springframework:spring-orm:jar:3.0.5.RELEASE:compile
  [INFO] |  \- org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile
  [INFO] +- org.springframework:spring-oxm:jar:3.0.5.RELEASE:compile
  [INFO] +- org.springframework:spring-web:jar:3.0.0.RC3:compile
  [INFO] +- org.springframework:spring-webmvc:jar:3.0.5.RELEASE:compile
  [INFO] |  \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
  [INFO] +- org.springframework:spring-test:jar:3.0.5.RELEASE:test
  [INFO] \- com.sun.jersey.contribs:jersey-spring:jar:1.12:compile
  [INFO]    \- com.sun.jersey:jersey-servlet:jar:1.12:compile
  </code></pre>
  
  <p>In my pom.xml I have defined a property which I use on all Spring artifacts, and it's defined like so:</p>
  
  <pre><code>&lt;org.springframework.version&gt;3.0.5.RELEASE&lt;/org.springframework.version&gt;
  </code></pre>
  
  <p>And these are my dependencies:</p>
  
  <pre><code>    &lt;!-- spring libraries --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-expression&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Why on earth does it use different versions?</p>
  
  <p>Edit:</p>
  
  <p>Okay, so I just discovered these warnings. I suppose this has something to do with it: </p>
  
  <pre><code>Downloading: http://download.java.net/maven/2/org/springframework/spring-core/3.0.0.RC3/spring-core-3.0.0.RC3.pom
  Downloading: http://repo1.maven.org/maven2/org/springframework/spring-core/3.0.0.RC3/spring-core-3.0.0.RC3.pom
  [WARNING] Missing POM for org.springframework:spring-core:jar:3.0.5.RELEASE
  Downloading: http://download.java.net/maven/2/org/springframework/spring-beans/3.0.0.RC3/spring-beans-3.0.0.RC3.pom
  Downloading: http://repo1.maven.org/maven2/org/springframework/spring-beans/3.0.0.RC3/spring-beans-3.0.0.RC3.pom
  [WARNING] Missing POM for org.springframework:spring-beans:jar:3.0.5.RELEASE
  Downloading: http://download.java.net/maven/2/org/springframework/spring-aop/3.0.0.RC3/spring-aop-3.0.0.RC3.pom
  Downloading: http://repo1.maven.org/maven2/org/springframework/spring-aop/3.0.0.RC3/spring-aop-3.0.0.RC3.pom
  [WARNING] Missing POM for org.springframework:spring-aop:jar:3.0.5.RELEASE
  Downloading: http://download.java.net/maven/2/org/springframework/spring-context/3.0.0.RC3/spring-context-3.0.0.RC3.pom
  Downloading: http://repo1.maven.org/maven2/org/springframework/spring-context/3.0.0.RC3/spring-context-3.0.0.RC3.pom
  [WARNING] Missing POM for org.springframework:spring-context:jar:3.0.5.RELEASE
  Downloading: http://download.java.net/maven/2/org/springframework/spring-web/3.0.0.RC3/spring-web-3.0.0.RC3.pom
  Downloading: http://repo1.maven.org/maven2/org/springframework/spring-web/3.0.0.RC3/spring-web-3.0.0.RC3.pom
  [WARNING] Missing POM for org.springframework:spring-web:jar:3.0.5.RELEASE
  </code></pre>
  
  <p>Why are the poms missing for some artifacts though? And why does it fall back to using 3.0.0.RC3?</p>