You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/09/14 01:37:17 UTC
svn commit: r814440 -
/maven/ant-tasks/trunk/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java
Author: bentmann
Date: Sun Sep 13 23:37:16 2009
New Revision: 814440
URL: http://svn.apache.org/viewvc?rev=814440&view=rev
Log:
[MANTTASKS-159] Wrong credentials used for mirrored repositories
Modified:
maven/ant-tasks/trunk/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java
Modified: maven/ant-tasks/trunk/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java
URL: http://svn.apache.org/viewvc/maven/ant-tasks/trunk/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java?rev=814440&r1=814439&r2=814440&view=diff
==============================================================================
--- maven/ant-tasks/trunk/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java (original)
+++ maven/ant-tasks/trunk/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java Sun Sep 13 23:37:16 2009
@@ -427,6 +427,13 @@
// manager at the start like m2 does, and then match up by repository id
// As is, this could potentially cause a problem with 2 remote repositories with different authentication info
+ Mirror mirror = getMirror( getSettings().getMirrors(), repository );
+ if ( mirror != null )
+ {
+ repository.setUrl( mirror.getUrl() );
+ repository.setId( mirror.getId() );
+ }
+
if ( repository.getAuthentication() == null )
{
Server server = getSettings().getServer( repository.getId() );
@@ -444,13 +451,6 @@
repository.addProxy( new Proxy( proxy ) );
}
}
-
- Mirror mirror = getMirror( getSettings().getMirrors(), repository );
- if ( mirror != null )
- {
- repository.setUrl( mirror.getUrl() );
- repository.setId( mirror.getId() );
- }
}
protected Object lookup( String role )