Dependency resolution in multimodule project with child having different groupId
--------------------------------------------------------------------------------

                 Key: MNG-5062
                 URL: http://jira.codehaus.org/browse/MNG-5062
             Project: Maven 2 & 3
          Issue Type: Bug
    Affects Versions: 3.0.3
         Environment: java 1.6 maven 3.0.3 (3.0.2 also)
            Reporter: Samuli Saarinen
            Priority: Minor
         Attachments: maven-test.zip

I don't know if this is as user or maven error but I'll report it any way. 
Dependency resolution does not work correctly when child project references a 
dependency defined in parent's dependencyManagement if childs groupId is not 
same as parents.

parents depedencyManagement
{code:xml}
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>child</artifactId>
      <version>${project.version}</version>
    </dependency>
....
{code}

childs pom.xml
{code:xml}
...
<parent>
  <groupId>com.example.test</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.example.other</groupId>
<artifactId>child2</artifactId>
        
<dependencies>
  <dependency>
    <groupId>com.example.test</groupId>
    <artifactId>child</artifactId>
  </dependency>
</dependencies>                 
{code}

It works if hard coded groupId instead of ${project.groupId} is used in the 
parent.

Attached is a sample project that demonstrates the problem.



-- 
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

        

Reply via email to