summaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2014-07-30 15:32:54 +1000
committerBrett Porter <brett@apache.org>2014-07-30 16:07:38 +1000
commitfcf2e3e27c39a825186af57fd4d1f89b55be4b87 (patch)
treed36007edc972512e72e5c53a28bd19a343abcd46 /archiva-modules/metadata
parent54f97d54cb262f628041b042adb31cc2add21533 (diff)
downloadarchiva-fcf2e3e27c39a825186af57fd4d1f89b55be4b87.tar.gz
archiva-fcf2e3e27c39a825186af57fd4d1f89b55be4b87.zip
make optional for Spring
in case of tests that don't add any repository listeners to the classpath
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
index 903aed64e..559798a62 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
@@ -33,6 +33,7 @@ import org.apache.archiva.redback.components.cache.Cache;
import org.apache.archiva.repository.events.RepositoryListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
@@ -78,6 +79,7 @@ public class DefaultMetadataResolver
private RepositoryStorage repositoryStorage;
@Inject
+ @Autowired(required = false)
private List<RepositoryListener> listeners;
/**