Issue with properties inherited from parent POM -----------------------------------------------
Key: MNG-5099 URL: http://jira.codehaus.org/browse/MNG-5099 Project: Maven 2 & 3 Issue Type: Bug Components: Inheritance and Interpolation Affects Versions: 3.0.3 Environment: java 1.6.0_24 Reporter: Dan Checkoway This worked absolutely fine in 2.2.1. Fails in 3.0.3. ./deps/pom.xml has: <properties> <mysql.connector.version>5.1.16</mysql.connector.version> </properties> ./library/pom.xml has: <parent> <groupId>com.mycompany</groupId> <artifactId>base</artifactId> <version>1.0</version> <relativePath>../deps/pom.xml</relativePath> </parent> ... <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.connector.version}</version> <scope>runtime</scope> </dependency> ./otherlib/pom.xml has: <dependency> <groupId>com.mycompany</groupId> <artifactId>mycompany-library</artifactId> <version>1.0</version> <scope>compile</scope> </dependency> cd library mvn deploy (all good) cd otherlib mvn compile (fails) [ERROR] Failed to execute goal on project mycompany-otherlib: Could not resolve dependencies for project com.mycompany:mycompany-otherlib:jar:1.0: Failure to find mysql:mysql-connector-java:jar:${mysql.connector.version} in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] It's as if it's treating the ${mysql.connector.version} in the runtime dependency literally, instead of resolving that property. I can work around this by adding this to library/pom.xml: <properties> <mysql.connector.version>5.1.16</mysql.connector.version> </properties> Please let me know if I'm missing something simple, but it worked fine without the workaround in 2.2.1, and this looks like a bug to me! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira