diff options
author | Olivier Lamy <olamy@apache.org> | 2012-10-31 21:40:38 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-10-31 21:40:38 +0000 |
commit | 27c8f4047caf10fa1a0db28e61f2170faa437785 (patch) | |
tree | 5c217ce28db94f3212be0f80cf4a0bd334281002 /archiva-modules/plugins/maven2-repository | |
parent | 94a06383442913ff468844b235b52a77d0a230b6 (diff) | |
download | archiva-27c8f4047caf10fa1a0db28e61f2170faa437785.tar.gz archiva-27c8f4047caf10fa1a0db28e61f2170faa437785.zip |
move ntlm wagon trick in wagonFactory to avoid duplicate code
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1404367 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins/maven2-repository')
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java index 545312762..08aacd166 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java @@ -235,18 +235,10 @@ public class RepositoryModelResolver String protocol = getProtocol( remoteRepository.getUrl() ); final NetworkProxy networkProxy = this.networkProxyMap.get( remoteRepository.getId() ); - // if it's a ntlm proxy we have to lookup the wagon light which support thats - // wagon http client doesn't support that - wagon = ( networkProxy != null && networkProxy.isUseNtlm() ) - ? wagonFactory.getWagon( - new WagonFactoryRequest( "wagon#" + protocol + "-ntlm", remoteRepository.getExtraHeaders() ) ) - : wagonFactory.getWagon( - new WagonFactoryRequest( "wagon#" + protocol, remoteRepository.getExtraHeaders() ) ); - if ( wagon == null ) - { - wagon = wagonFactory.getWagon( - new WagonFactoryRequest( "wagon#" + protocol, remoteRepository.getExtraHeaders() ) ); - } + wagon = wagonFactory.getWagon( + new WagonFactoryRequest( "wagon#" + protocol, remoteRepository.getExtraHeaders() ).networkProxy( + networkProxy ) ); + if ( wagon == null ) { throw new RuntimeException( "Unsupported remote repository protocol: " + protocol ); |