[MNG-4845] [regression] MavenProject.getDependencyArtifact() returns artifacts without version for dependency with version range

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1003537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-10-01 13:43:07 +00:00
parent 5d7c76403d
commit a54c02e3f3
1 changed files with 2 additions and 2 deletions

View File

@ -109,13 +109,13 @@ public class LifecycleDependencyResolver
Map<String, Artifact> map = new HashMap<String, Artifact>(); Map<String, Artifact> map = new HashMap<String, Artifact>();
for ( Artifact artifact : artifacts ) for ( Artifact artifact : artifacts )
{ {
map.put( artifact.getId(), artifact ); map.put( artifact.getDependencyConflictId(), artifact );
} }
for ( Artifact artifact : project.getDependencyArtifacts() ) for ( Artifact artifact : project.getDependencyArtifacts() )
{ {
if ( artifact.getFile() == null ) if ( artifact.getFile() == null )
{ {
Artifact resolved = map.get( artifact.getId() ); Artifact resolved = map.get( artifact.getDependencyConflictId() );
if ( resolved != null ) if ( resolved != null )
{ {
artifact.setFile( resolved.getFile() ); artifact.setFile( resolved.getFile() );