From 096014099ed8436b2e9e7240c5b180a2f191ce90 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Mon, 11 May 2009 20:59:54 +0000 Subject: [PATCH] o put the workspace respository impl in earlier so poms can be resolved from the workspace. git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@773694 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/maven/DefaultMaven.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index d672f4ab3c..1781b73229 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -90,6 +90,12 @@ public class DefaultMaven DelegatingLocalArtifactRepository delegatingLocalArtifactRepository = new DelegatingLocalArtifactRepository(); delegatingLocalArtifactRepository.addToEndOfSearchOrder( new UserLocalArtifactRepository( request.getLocalRepository() ) ); + + if ( localArtifactRepositories != null && localArtifactRepositories.size() > 0 ) + { + delegatingLocalArtifactRepository.addToBeginningOfSearchOrder( localArtifactRepositories.get( 0 ) ); + } + request.setLocalRepository( delegatingLocalArtifactRepository ); MavenSession session; @@ -141,12 +147,7 @@ public class DefaultMaven // Reactor // Workspace // User Local Repository - - if ( localArtifactRepositories != null && localArtifactRepositories.size() > 0 ) - { - delegatingLocalArtifactRepository.addToBeginningOfSearchOrder( localArtifactRepositories.get( 0 ) ); - } - + delegatingLocalArtifactRepository.addToBeginningOfSearchOrder( new ReactorArtifactRepository( projects ) ); if ( result.hasExceptions() )