mirror of https://github.com/apache/maven.git
re-fixing MNG-3974
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@748688 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f5771c7dfb
commit
d8b2bb7b3c
|
@ -42,7 +42,13 @@ public class DefaultMirrorBuilder
|
|||
|
||||
ArtifactRepository mirror = new DefaultArtifactRepository( id, url, null );
|
||||
|
||||
mirrors.put( mirrorOf, mirror );
|
||||
//System.out.println( mirror + " --> " + mirrorOf );
|
||||
|
||||
//first one must win so don't insert more.
|
||||
if (!mirrors.containsKey( mirrorOf ))
|
||||
{
|
||||
mirrors.put( mirrorOf, mirror );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,6 +73,8 @@ public class DefaultMirrorBuilder
|
|||
if ( matchPattern( originalRepository, pattern ) )
|
||||
{
|
||||
selectedMirror = mirrors.get( pattern );
|
||||
//stop on the first match.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class MirrorProcessorTest
|
|||
|
||||
}
|
||||
|
||||
public void xtestMirrorStopOnFirstMatch()
|
||||
public void testMirrorStopOnFirstMatch()
|
||||
{
|
||||
//exact matches win first
|
||||
mirrorBuilder.addMirror( "a2", "a,b", "http://a2" );
|
||||
|
|
Loading…
Reference in New Issue