diff options
author | Olivier Lamy <olamy@apache.org> | 2012-09-13 22:11:00 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-09-13 22:11:00 +0000 |
commit | bdb81fef28a65fcd8f339d7f252e77fa8a5bed4e (patch) | |
tree | b1a4c4738125b39637ffd486368a9fa9a675b84e /archiva-modules/archiva-base | |
parent | 0638fbf4b1a7bf85289ca1ad1c330ae0c7e4afe1 (diff) | |
download | archiva-bdb81fef28a65fcd8f339d7f252e77fa8a5bed4e.tar.gz archiva-bdb81fef28a65fcd8f339d7f252e77fa8a5bed4e.zip |
[MRM-1668] download artifacts when coming from search results.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1384563 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r-- | archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java | 38 |
1 files changed, 17 insertions, 21 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 2eef7df48..f15e7866d 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 @@ -19,7 +19,6 @@ package org.apache.archiva.proxy; * under the License. */ -import com.google.common.collect.Lists; import com.google.common.io.Files; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.NetworkProxy; @@ -41,6 +40,9 @@ import org.apache.archiva.policies.ProxyDownloadException; import org.apache.archiva.policies.urlcache.UrlFailureCache; import org.apache.archiva.proxy.common.WagonFactory; import org.apache.archiva.proxy.common.WagonFactoryException; +import org.apache.archiva.redback.components.registry.Registry; +import org.apache.archiva.redback.components.registry.RegistryListener; +import org.apache.archiva.redback.components.taskqueue.TaskQueueException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.RepositoryContentFactory; @@ -64,9 +66,6 @@ import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.maven.wagon.proxy.ProxyInfo; import org.apache.maven.wagon.repository.Repository; import org.apache.tools.ant.types.selectors.SelectorUtils; -import org.apache.archiva.redback.components.registry.Registry; -import org.apache.archiva.redback.components.registry.RegistryListener; -import org.apache.archiva.redback.components.taskqueue.TaskQueueException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -90,11 +89,10 @@ import java.util.concurrent.ConcurrentHashMap; /** * DefaultRepositoryProxyConnectors * - * * @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 { @@ -104,21 +102,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; /** @@ -159,7 +157,7 @@ public class DefaultRepositoryProxyConnectors * */ @Inject - @Named( value = "archivaTaskScheduler#repository" ) + @Named ( value = "archivaTaskScheduler#repository" ) private ArchivaTaskScheduler scheduler; @Inject @@ -173,7 +171,7 @@ public class DefaultRepositoryProxyConnectors } - @SuppressWarnings( "unchecked" ) + @SuppressWarnings ( "unchecked" ) private void initConnectorsAndNetworkProxies() { @@ -444,19 +442,17 @@ public class DefaultRepositoryProxyConnectors } catch ( NotFoundException e ) { - if ( log.isDebugEnabled() ) - { - log.debug( "Metadata {} not found on remote repository \"{}\".", - Lists.<Object>newArrayList( logicalPath, targetRepository.getRepository().getId() ), e ); - } + + log.debug( "Metadata {} not found on remote repository '{}'.", logicalPath, + targetRepository.getRepository().getId(), e ); + } catch ( NotModifiedException e ) { - if ( log.isDebugEnabled() ) - { - log.debug( "Metadata {} not updated on remote repository \"{}\".", - Lists.<Object>newArrayList( logicalPath, targetRepository.getRepository().getId() ), e ); - } + + log.debug( "Metadata {} not updated on remote repository '{}'.", logicalPath, + targetRepository.getRepository().getId(), e ); + } catch ( ProxyException e ) { |