I am trying to build a project with a dependency like this:
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>packageA</artifactId>
<version>${branch}-3.2.4.25.2</version>
</dependency>
The pom for com.foo.bar.packageA has a dependency like this:
<properties>
<branch>DEV</branch> <!-- default value -->
</properties>
<dependencies>
<dependency>
<groupId>org.baz</groupId>
<artifactId>packageB</artifactId>
<version>${branch}-3.2.4.25.2</version>
</dependency>
</dependencies>
I build with the command:
mvn clean install -Dbranch=Iago
The dependency for com.foo.bar.packageA is resolved as I expect: Iago-3.2.4.25.2. However, the dependency for org.baz.packageB is resolved as: DEV-3.2.4.25.2. Am I not correct in thinking that the branch property with value DEV should be overridden with my command-line value of Iago?