You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "luke w patterson (JIRA)" <ji...@codehaus.org> on 2008/04/14 18:03:58 UTC

[jira] Commented: (MNG-3380) MavenMetadataSource retrieves ResolutionGroup without consulting ManagedVersionMap, is problem when relocation

    [ http://jira.codehaus.org/browse/MNG-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=130760#action_130760 ] 

luke w patterson commented on MNG-3380:
---------------------------------------

The problem still exists with 2.0.9.

Until the bug is fixed, the assembly plugin I'm using won't receive accurate information.  



Relocated transitive dependencies can be either missing or wrong during tree resolution.


> MavenMetadataSource retrieves ResolutionGroup without consulting ManagedVersionMap, is problem when relocation
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3380
>                 URL: http://jira.codehaus.org/browse/MNG-3380
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.8
>            Reporter: luke w patterson
>         Attachments: MNG-3380-maven-artifact.patch, patch.txt, repo.zip
>
>
> Consider the following scenario:
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>root-groupId</groupId>
>   <artifactId>root-artifactId</artifactId>
>   <version>1</version>
>   <dependencies>
>     <dependency>
>       <groupId>direct-dependency-groupId</groupId>
>       <artifactId>direct-dependency-artifactId</artifactId>
>       <version>1</version>
>     </dependency>
>   </dependencies>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>transitive-dependency-new-groupId</groupId>
>         <artifactId>transitive-dependency-artifactId</artifactId>
>         <version>2</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
> </project>
>   <project>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>direct-dependency-groupId</groupId>
>     <artifactId>direct-dependency-artifactId</artifactId>
>     <version>1</version>
>     <dependencies>
>       <dependency>
>         <groupId>transitive-dependency-old-groupId</groupId>
>         <artifactId>transitive-dependency-artifactId</artifactId>
>         <version>1</version>
>       </dependency>
>     </dependencies>
>   </project>       
>        
>     <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>transitive-dependency-old-groupId</groupId>
>       <artifactId>transitive-dependency-artifactId</artifactId>
>       <version>1</version>
>       <distributionManagement>
>         <relocation>
>           <groupId>transitive-dependency-new-groupId</groupId>
>         </relocation>
>       </distributionManagement>
>     </project>       
>     <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>transitive-dependency-new-groupId</groupId>
>       <artifactId>transitive-dependency-artifactId</artifactId>
>       <version>1</version>
>       <dependencies>
>         <dependency>
>           <groupId>other-groupId</groupId>
>           <artifactId>other-artifactId-a</artifactId>
>           <version>1</version>
>         </dependency>
>       </dependencies>
>     </project>
>     <project>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>transitive-dependency-new-groupId</groupId>
>       <artifactId>transitive-dependency-artifactId</artifactId>
>       <version>2</version>
>       <dependencies>
>         <dependency>
>           <groupId>other-groupId</groupId>
>           <artifactId>other-artifactId-a</artifactId>
>           <version>1</version>
>         </dependency>
>         <dependency>
>           <groupId>other-groupId</groupId>
>           <artifactId>other-artifactId-b</artifactId>
>           <version>1</version>
>         </dependency>
>       </dependencies>
>     </project>       
>        
> --------------------------------------------------------------        
> actual dependency:tree 
>     
>  root-groupId:root-artifactId:jar:1
>  \- direct-dependency-groupId:direct-dependency-artifactId:jar:1:compile
>     \- transitive-dependency-new-groupId:transitive-dependency-artifactId:jar:2:compile (version managed from 1)
>        \- other-groupId:other-artifactId-a:jar:1:compile           
> -------------------------------------------------------------- 
> expected dependency:tree 
>     
>  root-groupId:root-artifactId:jar:1
>  \- direct-dependency-groupId:direct-dependency-artifactId:jar:1:compile
>     \- transitive-dependency-new-groupId:transitive-dependency-artifactId:jar:2:compile (version managed from 1)
>        \- other-groupId:other-artifactId-a:jar:1:compile    
>        \- other-groupId:other-artifactId-b:jar:1:compile <-- missing from actual result    
> -------------------------------------------------------------- 
>  
> As you can see from the listing above, other-groupId:other-artifactId-b:jar:1:compile is missing from the dependency list.  
> I have attached the zipped repo which was used when generating the dependency:tree listings shown above.  I also attached a crude temporary patch which my team is currently using to resolve this issue.  After ignoring whitespace changes, it is about 10 lines different.
> Thanks,
> Luke

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