From 7e6c67fd945615407566466af4462d61b15ed688 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 13 Apr 2007 18:57:22 +0000 Subject: [PATCH] Correcting some plexus mappings (to help in unit tests). git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@528591 13f79535-47bb-0310-9956-ffa450edef68 --- .../ArchivaScheduledTaskExecutor.java | 19 +++++++++++++------ .../ArchivaScheduledTaskExecutorTest.xml | 8 ++++++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/archiva-jpox-database-refactor/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java b/archiva-jpox-database-refactor/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java index 98b712135..4ef4be1fb 100644 --- a/archiva-jpox-database-refactor/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java +++ b/archiva-jpox-database-refactor/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java @@ -69,10 +69,17 @@ public class ArchivaScheduledTaskExecutor extends AbstractLogEnabled implements private RepositoryDAO repositoryDAO; /** - * The collection of available consumers. + * The collection of available database consumers. * @plexus.requirement role="org.apache.maven.archiva.consumers.ArchivaArtifactConsumer" */ - private Map availableConsumers; + private Map availableDBConsumers; + + /** + * The collection of available repository consumers. + * @plexus.requirement role="org.apache.maven.archiva.consumers.RepositoryContentConsumer" + */ + private Map availableRepositoryConsumers; + public void executeTask( Task task ) throws TaskExecutionException { @@ -164,9 +171,9 @@ public class ArchivaScheduledTaskExecutor extends AbstractLogEnabled implements { String consumer = (String)i.next(); - if ( availableConsumers.containsKey( availableConsumers.get( consumer ) ) ) + if ( availableRepositoryConsumers.containsKey( availableRepositoryConsumers.get( consumer ) ) ) { - activeConsumers.add( availableConsumers.get( consumer ) ); + activeConsumers.add( availableRepositoryConsumers.get( consumer ) ); } else { @@ -178,10 +185,10 @@ public class ArchivaScheduledTaskExecutor extends AbstractLogEnabled implements { String consumer = (String)i.next(); - if ( availableConsumers.containsKey( availableConsumers.get( consumer ) ) ) + if ( availableRepositoryConsumers.containsKey( availableRepositoryConsumers.get( consumer ) ) ) { getLogger().warn( "Using consumer " + consumer ); - activeConsumers.add( availableConsumers.get( consumer ) ); + activeConsumers.add( availableRepositoryConsumers.get( consumer ) ); } else { diff --git a/archiva-jpox-database-refactor/archiva-scheduled/src/test/resources/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.xml b/archiva-jpox-database-refactor/archiva-scheduled/src/test/resources/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.xml index 5b212f6e9..17d200f5c 100644 --- a/archiva-jpox-database-refactor/archiva-scheduled/src/test/resources/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.xml +++ b/archiva-jpox-database-refactor/archiva-scheduled/src/test/resources/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.xml @@ -41,9 +41,13 @@ jdo repositoryDAO - + org.apache.maven.archiva.consumers.ArchivaArtifactConsumer - availableConsumers + availableDBConsumers + + + org.apache.maven.archiva.consumers.RepositoryContentConsumer + availableRepositoryConsumers -- 2.39.5