From 19dec1eff690aa152832b57244ebe436ba82d14b Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 20 Aug 2010 11:47:49 +0000 Subject: [PATCH] [MNG-4755] Version ranges cannot be resolved against mirror if a local artifact is present git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@987462 13f79535-47bb-0310-9956-ffa450edef68 --- .../metadata/DefaultRepositoryMetadataManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java index ca6fce074e..dec26f14a8 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java @@ -113,7 +113,11 @@ public class DefaultRepositoryMetadataManager if ( !request.isOffline() ) { - Date localCopyLastModified = getLocalCopyLastModified( localRepository, metadata ); + Date localCopyLastModified = null; + if ( metadata.getBaseVersion() != null ) + { + localCopyLastModified = getLocalCopyLastModified( localRepository, metadata ); + } for ( ArtifactRepository repository : remoteRepositories ) {