[ http://jira.codehaus.org/browse/MNG-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_120935 ]
Dave Casserly commented on MNG-3367: ------------------------------------ I dont agree, as i AM providing the version number. Heres how i think it should work. When i build ProjectC, it gets the variable ${snapshot.version} from the parent, ProjectA, where it is declared. That variable should now be stored in memory and all references to ${snapshot.version} should be replaced by the value in memory. (and there is no need for the sarcasm "How do you expect it to work if....") Thanks > Using a property as version number in multi project, doesnt resolve > ------------------------------------------------------------------- > > Key: MNG-3367 > URL: http://jira.codehaus.org/browse/MNG-3367 > Project: Maven 2 > Issue Type: Bug > Components: Dependencies > Affects Versions: 2.0.8 > Reporter: Dave Casserly > Attachments: projectA.zip > > > Here is my project layout > /------------>ProjectB------->ProjectBChild > / > ProjectA > \ > \----------->ProjectC------->ProjectCChild > 1. ProjectA pom contains a property (${snapshot.version}) that will be used > for the <version> in every single project and sub project. > 2. ProjectCChild has a dependency on ProjectBChild > 3. If i build from ProjectA, everything runs fine and it picks up the > property fine. > 4. However, if i try and build from ProjectC, it cant resolve the dependency > of ProjectBChild because the property ${snapshot.version} wont resolve.!!!!! > [INFO] Using default encoding to copy filtered resources. > Downloading: > http://repo1.maven.org/maven2/com/test/projectB/projectB/${snapshot.version}/projectB-${snapshot.version}.pom > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to resolve artifact. > GroupId: com.test.projectB > ArtifactId: projectB > Version: ${snapshot.version} > Reason: Unable to download the artifact from any repository > com.test.projectB:projectB:pom:${snapshot.version} > from the specified remote repositories: > central (http://repo1.maven.org/maven2) > Ive attached a sample project. -- 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