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

Chris Wewerka commented on MNG-2931:
------------------------------------

Very, very ugly effect of this bug is that already deployed versions are 
overwritten by newer versions without notice. Maven changes the artifact 
version to the managed version and deploys it to the repository

> 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

        

Reply via email to