From ed18f8b7c6e37ef3284647e8d1fa896385777f70 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 25 Sep 2009 12:14:31 +0000 Subject: [PATCH] [MNG-2098] Artifact resolver incorrectly selects repository which doesn't contain the selected version git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@818829 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/metadata/ArtifactRepositoryMetadata.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata.java index 6900aa45d4..8f109490ba 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata.java @@ -84,11 +84,16 @@ public class ArtifactRepositoryMetadata public ArtifactRepository getRepository() { - return artifact.getRepository(); + return null; } public void setRepository( ArtifactRepository remoteRepository ) { - artifact.setRepository( remoteRepository ); + /* + * NOTE: Metadata at the g:a level contains a collection of available versions. After merging, we can't tell + * which repository provides which version so the metadata manager must not restrict the artifact resolution to + * the repository with the most recent updates. + */ } + }