You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Carlos Sanchez (JIRA)" <ji...@codehaus.org> on 2007/04/05 03:37:20 UTC

[jira] Commented: (MNG-2931) DefaultArtifactCollector changes the version of the originatingArtifact if it's in the dependencyManagement with another version

    [ http://jira.codehaus.org/browse/MNG-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92116 ] 

Carlos Sanchez commented on MNG-2931:
-------------------------------------

The question is do we allow a project to extend another one that has a different version of it in dependencyManagement ?
if we do, then the current project version has to win over the managed one

> DefaultArtifactCollector changes the version of the originatingArtifact if it's in the dependencyManagement with another version
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2931
>                 URL: http://jira.codehaus.org/browse/MNG-2931
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts
>    Affects Versions: 2.0.5, 2.0.6
>            Reporter: Carlos Sanchez
>         Attachments: MNG-2931.patch
>
>
> DefaultDependencyTreeBuilder
> https://svn.apache.org/repos/asf/maven/shared/trunk/maven-dependency-tree/src/main/java/org/apache/maven/shared/dependency/tree/DefaultDependencyTreeBuilder.java
> calls collect like this
>             collector.collect( project.getDependencyArtifacts(), project.getArtifact(), managedVersions, repository,
>                                project.getRemoteArtifactRepositories(), metadataSource, null,
>                                Collections.singletonList( listener ) );
> Problem: 
> This pom 
> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-component-api/1.0-alpha-22/plexus-component-api-1.0-alpha-22.pom
> extends
> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-containers/1.0-alpha-22/plexus-containers-1.0-alpha-22.pom
> that in dependencyManagement has org.codehaus.plexus:plexus-component-api:1.0-alpha-19
> so during collect project.getArtifact().getVersion() is changed to the managedVersion instead of the original one
> Either this is a bug or an exception should be thrown when originatingArtifact is in managedVersions

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