diff options
author | Brett Porter <brett@apache.org> | 2014-07-30 15:32:54 +1000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2014-07-30 16:07:38 +1000 |
commit | fcf2e3e27c39a825186af57fd4d1f89b55be4b87 (patch) | |
tree | d36007edc972512e72e5c53a28bd19a343abcd46 /archiva-modules | |
parent | 54f97d54cb262f628041b042adb31cc2add21533 (diff) | |
download | archiva-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')
2 files changed, 4 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java index 5b6be2e8a..53c6f12c5 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java @@ -37,6 +37,7 @@ import org.apache.archiva.repository.RepositoryNotFoundException; import org.apache.archiva.repository.events.RepositoryListener; import org.apache.archiva.repository.metadata.MetadataTools; import org.apache.archiva.redback.components.registry.RegistryListener; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; @@ -98,6 +99,7 @@ public class RepositoryPurgeConsumer * */ @Inject + @Autowired(required = false) private List<RepositoryListener> listeners = Collections.emptyList(); /** 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; /** |