aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-08-22 15:11:34 +0000
committerOlivier Lamy <olamy@apache.org>2011-08-22 15:11:34 +0000
commit30ebe43f5972c545bb3a1c4b4059a1e5b0684aeb (patch)
tree82dfa998021b624d2183cef99692fe5f027d6326 /archiva-modules/archiva-base
parent0c7626a1374f2e3d08b75261d866e7601e6c5682 (diff)
downloadarchiva-30ebe43f5972c545bb3a1c4b4059a1e5b0684aeb.tar.gz
archiva-30ebe43f5972c545bb3a1c4b4059a1e5b0684aeb.zip
simplify inject of bean list
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1160293 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/KnownRepositoryContentConsumer.java2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java9
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java13
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/AbstractDefaultRepositoryContent.java11
4 files changed, 20 insertions, 15 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/KnownRepositoryContentConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/KnownRepositoryContentConsumer.java
index b73209ec5..66d98459f 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/KnownRepositoryContentConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/KnownRepositoryContentConsumer.java
@@ -27,5 +27,5 @@ package org.apache.maven.archiva.consumers;
public interface KnownRepositoryContentConsumer
extends RepositoryContentConsumer
{
-
+ // no op
}
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
index 0f1a99975..b52fc4eeb 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
@@ -107,12 +107,13 @@ public class RepositoryPurgeConsumer
private boolean deleteReleasedSnapshots;
- @Inject
- private ApplicationContext applicationContext;
+ //@Inject
+ //private ApplicationContext applicationContext;
/**
* plexus.requirement role="org.apache.archiva.repository.events.RepositoryListener"
*/
+ @Inject
private List<RepositoryListener> listeners = Collections.emptyList();
/**
@@ -250,8 +251,8 @@ public class RepositoryPurgeConsumer
@PostConstruct
public void initialize()
{
- this.listeners =
- new ArrayList<RepositoryListener>( applicationContext.getBeansOfType( RepositoryListener.class ).values() );
+ //this.listeners =
+ // new ArrayList<RepositoryListener>( applicationContext.getBeansOfType( RepositoryListener.class ).values() );
configuration.addChangeListener( this );
initIncludes();
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
index ec5042819..84782aef1 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
@@ -116,22 +116,25 @@ public class DefaultRepositoryProxyConnectors
@Named( value = "metadataTools#default" )
private MetadataTools metadataTools;
- @Inject
- private ApplicationContext applicationContext;
+ //@Inject
+ //private ApplicationContext applicationContext;
/**
* plexus.requirement role="org.apache.maven.archiva.policies.PreDownloadPolicy"
*/
+ @Inject
private Map<String, PreDownloadPolicy> preDownloadPolicies;
/**
* plexus.requirement role="org.apache.maven.archiva.policies.PostDownloadPolicy"
*/
+ @Inject
private Map<String, PostDownloadPolicy> postDownloadPolicies;
/**
* plexus.requirement role="org.apache.maven.archiva.policies.DownloadErrorPolicy"
*/
+ @Inject
private Map<String, DownloadErrorPolicy> downloadErrorPolicies;
/**
@@ -162,9 +165,9 @@ public class DefaultRepositoryProxyConnectors
{
initConnectorsAndNetworkProxies();
archivaConfiguration.addChangeListener( this );
- this.postDownloadPolicies = applicationContext.getBeansOfType( PostDownloadPolicy.class );
- this.preDownloadPolicies = applicationContext.getBeansOfType( PreDownloadPolicy.class );
- this.downloadErrorPolicies = applicationContext.getBeansOfType( DownloadErrorPolicy.class );
+ //this.postDownloadPolicies = applicationContext.getBeansOfType( PostDownloadPolicy.class );
+ //his.preDownloadPolicies = applicationContext.getBeansOfType( PreDownloadPolicy.class );
+ //this.downloadErrorPolicies = applicationContext.getBeansOfType( DownloadErrorPolicy.class );
}
@SuppressWarnings( "unchecked" )
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/AbstractDefaultRepositoryContent.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/AbstractDefaultRepositoryContent.java
index 8c685a72c..a8556c9cc 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/AbstractDefaultRepositoryContent.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/AbstractDefaultRepositoryContent.java
@@ -62,16 +62,17 @@ public abstract class AbstractDefaultRepositoryContent
/**
* plexus.requirement role="org.apache.archiva.metadata.repository.storage.maven2.ArtifactMappingProvider"
*/
- protected List<? extends ArtifactMappingProvider> artifactMappingProviders;
-
@Inject
- protected ApplicationContext applicationContext;
+ protected List<ArtifactMappingProvider> artifactMappingProviders;
+
+ //@Inject
+ //protected ApplicationContext applicationContext;
@PostConstruct
protected void initialize()
{
- artifactMappingProviders = new ArrayList<ArtifactMappingProvider>(
- applicationContext.getBeansOfType( ArtifactMappingProvider.class ).values() );
+ //artifactMappingProviders = new ArrayList<ArtifactMappingProvider>(
+ // applicationContext.getBeansOfType( ArtifactMappingProvider.class ).values() );
}
public ArtifactReference toArtifactReference( String path )