mirror of https://github.com/apache/archiva.git
make optional for Spring
in case of tests that don't add any repository listeners to the classpath
This commit is contained in:
parent
54f97d54cb
commit
fcf2e3e27c
|
@ -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();
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue