title: maven resolving wrong dependency version
body: <p>I have a play project which uses maven for dependency management. Let's say I have project 'MyProject' which has a parent pom, which defines the dependency version as property</p>
  
  <p><code>&lt;properties&gt;
       &lt;abc.version&gt;RS_1.0.1-SNAPSHOT&lt;/abc.version&gt;
   &lt;/properties&gt;</code></p>
  
  <p>where 'abc' is another java module used by MyProject.</p>
  
  <p>When I run <code>mvn clean compile -DskipTests=true</code> from MyProject root directory, the build fails saying it could not resolve dependency for abc. This is when abc is already present in  ~/.m2/repository. It actually searches for the dependency with version 'working@my_machine_name' instead of 'RS_1.0.1-SNAPSHOT' and thus cannot find it.</p>
  
  <p>I have tried cleaning .m2 and .ivy2 and rebuilding the project but it doesn't work. When I execute <code>mvn dependency:tree</code>, it shows the correct version for abc, but takes 'working@machine_name' at runtime.</p>
  
  <p>Has anyone encountered similar issue or know the cause of this? Any help would be greatly appreciated.</p>
  
  <p>This is my parent pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
      &lt;groupId&gt;placeholder&lt;/groupId&gt;
      &lt;artifactId&gt;placeholder&lt;/artifactId&gt;
      &lt;version&gt;1.0.7&lt;/version&gt;
  &lt;/parent&gt;
  &lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;example&lt;/artifactId&gt;
  &lt;version&gt;RS_1.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;name&gt;Example&lt;/name&gt;
  &lt;modules&gt;
      &lt;module&gt;service&lt;/module&gt;
  &lt;/modules&gt;
  &lt;scm&gt;
      &lt;connection&gt;placeholder&lt;/connection&gt;
      &lt;developerConnection&gt;placeholder&lt;/developerConnection&gt;
  &lt;/scm&gt;
  &lt;properties&gt;
      &lt;gitolderthan&gt;2016-04-15 00:00:00.0 AM&lt;/gitolderthan&gt;
      &lt;jacocoExecutionDataFile&gt;${project.basedir}/target/jacoco.exec&lt;/jacocoExecutionDataFile&gt;
      &lt;jacocoVersion&gt;0.7.2.201409121644&lt;/jacocoVersion&gt;
      &lt;play2.plugin.version&gt;1.0.0-beta3&lt;/play2.plugin.version&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;sbt-compiler.plugin.version&gt;1.0.0-beta5&lt;/sbt-compiler.plugin.version&gt;
      &lt;play2-scala.version&gt;2.11&lt;/play2-scala.version&gt;
      &lt;module_which_is_failing.version&gt;RS_1.0.1-SNAPSHOT&lt;/module_which_is_failing.version&gt;
      &lt;swagger.version&gt;1.3.12&lt;/swagger.version&gt;
  &lt;/properties&gt;
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
               &lt;groupId&gt;com.typesafe&lt;/groupId&gt;
               &lt;artifactId&gt;config&lt;/artifactId&gt;
               &lt;version&gt;1.3.0&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.wordnik&lt;/groupId&gt;
              &lt;artifactId&gt;swagger-annotations&lt;/artifactId&gt;
              &lt;version&gt;${swagger.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
              &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;1.3.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpmime&lt;/artifactId&gt;
              &lt;version&gt;4.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;1.1.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;janino&lt;/groupId&gt;
              &lt;artifactId&gt;janino&lt;/artifactId&gt;
              &lt;version&gt;2.5.10&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
              &lt;artifactId&gt;json-path&lt;/artifactId&gt;
              &lt;version&gt;0.9.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
              &lt;artifactId&gt;json-path-assert&lt;/artifactId&gt;
              &lt;version&gt;0.9.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.codahale.metrics&lt;/groupId&gt;
              &lt;artifactId&gt;metrics-core&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-RC1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.codahale.metrics&lt;/groupId&gt;
              &lt;artifactId&gt;metrics-graphite&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-RC1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.codahale.metrics&lt;/groupId&gt;
              &lt;artifactId&gt;metrics-ganglia&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-RC1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.codahale.metrics&lt;/groupId&gt;
              &lt;artifactId&gt;metrics-logback&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-RC1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-core&lt;/artifactId&gt;
              &lt;version&gt;1.0.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.6.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
              &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
              &lt;version&gt;1.0.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.codahale.metrics&lt;/groupId&gt;
              &lt;artifactId&gt;metrics-annotation&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-RC1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
              &lt;version&gt;1.10.19&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-core&lt;/artifactId&gt;
              &lt;version&gt;1.10.19&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.powermock&lt;/groupId&gt;
              &lt;artifactId&gt;powermock-module-junit4&lt;/artifactId&gt;
              &lt;version&gt;1.6.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.powermock&lt;/groupId&gt;
              &lt;artifactId&gt;powermock-api-mockito&lt;/artifactId&gt;
              &lt;version&gt;1.6.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.wink&lt;/groupId&gt;
              &lt;artifactId&gt;wink-component-test-support&lt;/artifactId&gt;
              &lt;version&gt;1.3.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.velocity&lt;/groupId&gt;
              &lt;artifactId&gt;velocity&lt;/artifactId&gt;
              &lt;version&gt;1.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mvel&lt;/groupId&gt;
              &lt;artifactId&gt;mvel2&lt;/artifactId&gt;
              &lt;version&gt;2.2.5.Final&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;module_which_is_failing&lt;/groupId&gt;
              &lt;artifactId&gt;module_which_is_failing_submodule1&lt;/artifactId&gt;
              &lt;version&gt;${ssi-scheduler-contract.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.servicesource.scheduler.contract&lt;/groupId&gt;
              &lt;artifactId&gt;module_which_is_failing_submodule2&lt;/artifactId&gt;
              &lt;version&gt;${ssi-scheduler-contract.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.quartz-scheduler&lt;/groupId&gt;
              &lt;artifactId&gt;quartz&lt;/artifactId&gt;
              &lt;version&gt;2.2.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-csv&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-core&lt;/artifactId&gt;
              &lt;version&gt;2.16.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-mongodb&lt;/artifactId&gt;
              &lt;version&gt;2.16.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-aws&lt;/artifactId&gt;
              &lt;version&gt;2.16.3&lt;/version&gt;
      &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                      &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
                      &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-hazelcast&lt;/artifactId&gt;
              &lt;version&gt;2.16.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;amazon-sqs-java-messaging-lib&lt;/artifactId&gt;
              &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk-sqs&lt;/artifactId&gt;
              &lt;version&gt;1.11.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk-s3&lt;/artifactId&gt;
              &lt;version&gt;1.11.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.jms&lt;/groupId&gt;
              &lt;artifactId&gt;jms-api&lt;/artifactId&gt;
              &lt;version&gt;1.1-rev-1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;
          &lt;/snapshots&gt;
          &lt;id&gt;placeholder&lt;/id&gt;
          &lt;name&gt;placeholder&lt;/name&gt;
          &lt;url&gt;placeholder&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;daily&lt;/updatePolicy&gt;
          &lt;/snapshots&gt;
          &lt;id&gt;placeholder&lt;/id&gt;
          &lt;name&gt;placeholder&lt;/name&gt;
          &lt;url&gt;placeholder&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;placeholder&lt;/groupId&gt;
              &lt;artifactId&gt;play2-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${root.version}&lt;/version&gt;
              &lt;extensions&gt;true&lt;/extensions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>P.S. I have replaced important entries with 'placeholder'</p>