Emond Papegaaij created MNG-5908: ------------------------------------ Summary: Properties in imported poms are resolved inconsistently Key: MNG-5908 URL: https://issues.apache.org/jira/browse/MNG-5908 Project: Maven Issue Type: Bug Components: core Affects Versions: 3.3.3 Reporter: Emond Papegaaij
Properties in an imported pom are resolved in the inheritance chain of the import itself and can only be overridden via de commandline. The attached example project demonstrates the problem. Layout: * {{test-parent}} defines 3 modules and a property for the slf4j version. * {{test-parent-bom}} has {{dependencyManagement}} for slf4j using the version from its parent. * {{test-parent-base}} imports {{test-parent-bom}} * {{test-parent-project}} has {{test-parent-base}} as parent, changes the value of the property and declares a {{dependency}} on slf4j The overridden property value does not take effect. However, if specified on the commandline (via {{-Dtopicus.version.org.slf4j=1.7.11}}) it does, even when running mvn inside {{project}} (after running mvn install in the root): {code} # mvn dependency:tree [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ test-parent-project --- [INFO] nl.topicus.onderwijs.test:test-parent-project:jar:1.0-SNAPSHOT [INFO] \- org.slf4j:slf4j-api:jar:1.7.12:compile {code} {code} # mvn dependency:tree -Dtopicus.version.org.slf4j=1.7.11 [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ test-parent-project --- [INFO] nl.topicus.onderwijs.test:test-parent-project:jar:1.0-SNAPSHOT [INFO] \- org.slf4j:slf4j-api:jar:1.7.11:compile {code} I would expect properties in a pom to override properties from imported poms. -- This message was sent by Atlassian JIRA (v6.3.4#6332)