summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java18
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java4
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java9
3 files changed, 18 insertions, 13 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
index 9334a88f0..788ae80fe 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java
@@ -96,7 +96,7 @@ import java.util.concurrent.ConcurrentHashMap;
* @todo exception handling needs work - "not modified" is not really an exceptional case, and it has more layers than
* your average brown onion
*/
-@Service ("repositoryProxyConnectors#default")
+@Service ( "repositoryProxyConnectors#default" )
public class DefaultRepositoryProxyConnectors
implements RepositoryProxyConnectors, RegistryListener
{
@@ -106,21 +106,21 @@ public class DefaultRepositoryProxyConnectors
*
*/
@Inject
- @Named (value = "archivaConfiguration#default")
+ @Named ( value = "archivaConfiguration#default" )
private ArchivaConfiguration archivaConfiguration;
/**
*
*/
@Inject
- @Named (value = "repositoryContentFactory#default")
+ @Named ( value = "repositoryContentFactory#default" )
private RepositoryContentFactory repositoryFactory;
/**
*
*/
@Inject
- @Named (value = "metadataTools#default")
+ @Named ( value = "metadataTools#default" )
private MetadataTools metadataTools;
/**
@@ -161,7 +161,7 @@ public class DefaultRepositoryProxyConnectors
*
*/
@Inject
- @Named (value = "archivaTaskScheduler#repository")
+ @Named ( value = "archivaTaskScheduler#repository" )
private ArchivaTaskScheduler scheduler;
@Inject
@@ -175,7 +175,7 @@ public class DefaultRepositoryProxyConnectors
}
- @SuppressWarnings ("unchecked")
+ @SuppressWarnings ( "unchecked" )
private void initConnectorsAndNetworkProxies()
{
@@ -705,8 +705,10 @@ public class DefaultRepositoryProxyConnectors
}
wagon = ( networkProxy != null && networkProxy.isUseNtlm() )
- ? wagonFactory.getWagon( new WagonFactoryRequest().protocol( "wagon#" + protocol + "-ntlm" ) )
- : wagonFactory.getWagon( new WagonFactoryRequest().protocol( "wagon#" + protocol ) );
+ ? wagonFactory.getWagon( new WagonFactoryRequest( "wagon#" + protocol + "-ntlm",
+ remoteRepository.getRepository().getExtraHeaders() ) )
+ : wagonFactory.getWagon( new WagonFactoryRequest( "wagon#" + protocol,
+ remoteRepository.getRepository().getExtraHeaders() ) );
if ( wagon == null )
{
throw new ProxyException( "Unsupported target repository protocol: " + protocol );
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
index 92b6e04ad..f8d9271c1 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
@@ -135,8 +135,8 @@ public class DownloadRemoteIndexTask
new URL( this.remoteRepository.getUrl() ).getProtocol() + ( ( this.networkProxy != null
&& this.networkProxy.isUseNtlm() ) ? "-ntlm" : "" );
- final StreamWagon wagon =
- (StreamWagon) wagonFactory.getWagon( new WagonFactoryRequest().protocol( wagonProtocol ) );
+ final StreamWagon wagon = (StreamWagon) wagonFactory.getWagon(
+ new WagonFactoryRequest( wagonProtocol, this.remoteRepository.getExtraHeaders() ) );
int timeoutInMilliseconds = remoteRepository.getTimeout() * 1000;
// FIXME olamy having 2 config values
wagon.setReadTimeout( timeoutInMilliseconds );
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 );