summaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-10-24 21:14:46 +0000
committerOlivier Lamy <olamy@apache.org>2012-10-24 21:14:46 +0000
commita51724b013f4035bf06154266cf3ed0fce74c09e (patch)
treec06ae07b0d7ffa44c557d4f0c455ebb38e92b6c7 /archiva-modules/plugins
parent45ded60339d7ed394643853b54d24f17a9d16d04 (diff)
downloadarchiva-a51724b013f4035bf06154266cf3ed0fce74c09e.tar.gz
archiva-a51724b013f4035bf06154266cf3ed0fce74c09e.zip
[MRM-1705] Feature to add custom parameters and/or headers when requesting an external repositories.
correctly use headers. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1401889 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java9
1 files changed, 6 insertions, 3 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 7351d8aa1..2c7bfb2b8 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
@@ -238,9 +238,12 @@ public class RepositoryModelResolver
// 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().protocol( "wagon#" + protocol + "-ntlm" ) )
- : wagonFactory.getWagon( new WagonFactoryRequest().protocol( "wagon#" + protocol ) );
- wagon = wagonFactory.getWagon( new WagonFactoryRequest().protocol( "wagon#" + protocol ) );
+ ? wagonFactory.getWagon(
+ new WagonFactoryRequest( "wagon#" + protocol + "-ntlm", remoteRepository.getExtraHeaders() ) )
+ : wagonFactory.getWagon(
+ new WagonFactoryRequest( "wagon#" + protocol, remoteRepository.getExtraHeaders() ) );
+ wagon = wagonFactory.getWagon(
+ new WagonFactoryRequest( "wagon#" + protocol, remoteRepository.getExtraHeaders() ) );
if ( wagon == null )
{
throw new RuntimeException( "Unsupported remote repository protocol: " + protocol );