[ https://jira.codehaus.org/browse/MNG-5086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MNG-5086. ---------------------------------- Resolution: Not A Bug Assignee: Benjamin Bentmann The complete error msg: {noformat} [ERROR] Failed to execute goal on project moduleA: Could not resolve dependencies for project maven-dependency-grouping:moduleA:jar:0.1-SNAPSHOT: Failed to collect dependencies for [maven-dependency-grouping:depends:pom:0.1-SNAPSHOT (compile)]: Failed to read artifact descriptor for maven-dependency-grouping:depends:pom:0.1-SNAPSHOT: Could not find artifact maven-dependency-grouping:maven-dependency-grouping:pom:0.1-SNAPSHOT {noformat} which is expected behavior given that the mvn invocation on the "group" directory did not install the parent POM. {{<relativePath>}} is only relevant when building a local project, it is irrelevant for POMs coming from the repository like maven-dependency-grouping:depends:pom:0.1-SNAPSHOT when dependency resolution happens for moduleA. In other words, the mvn invocation on "group" produced an incomplete local repository. This merely works in mvn2 by accident due to a faulty cache that doesn't respect the conceptual boundary between local projects and dependencies. > Maven 3.0.3 fails to use relativePath for parent pom location. > -------------------------------------------------------------- > > Key: MNG-5086 > URL: https://jira.codehaus.org/browse/MNG-5086 > Project: Maven 2 & 3 > Issue Type: Bug > Affects Versions: 3.0.3 > Environment: Windows 7 > Reporter: Ryan J > Assignee: Benjamin Bentmann > Attachments: maven-dependency-grouping.zip > > > After updating to Maven 3.0.3 I've noticed it fails to use the 'relativePath' > I've specified in the 'parent' section of my POMs. The > [documentation|http://maven.apache.org/ref/3.0.3/maven-model/maven.html#class_parent] > states: > {quote} > Maven looks for the parent POM first in this location on the filesystem, then > the local repository, and lastly in the remote repo. > {quote} > However, this does not appear to be the case. I'll attach an example project > (please excuse the inaccurate name). To reproduce: > 1) Go to the *group* module and run {{mvn clean install}} > 2) Go to the *moduleA* module and run {{mvn compile}} > Step one should install the modules *depends*, *moduleB* and *group* to the > local repository. The *maven-dependency-grouping* module will _not_ be > installed to the local repository. At step two, *moduleA* should compile, > but fails with the (partial) error: > {quote} > Could not find artifact > maven-dependency-grouping:maven-dependency-grouping:pom:0.1-SNAPSHOT in... > {quote} > According to the documentation, the above dependency should get resolved via > the 'relativePath' specified in the 'parent' element of the POM. Maven 2.2.1 > behaves correctly when repeating the above steps. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira