]> source.dussan.org Git - archiva.git/commitdiff
Correcting some plexus mappings (to help in unit tests).
authorJoakim Erdfelt <joakime@apache.org>
Fri, 13 Apr 2007 18:57:22 +0000 (18:57 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Fri, 13 Apr 2007 18:57:22 +0000 (18:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@528591 13f79535-47bb-0310-9956-ffa450edef68

archiva-jpox-database-refactor/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutor.java
archiva-jpox-database-refactor/archiva-scheduled/src/test/resources/org/apache/maven/archiva/scheduled/executors/ArchivaScheduledTaskExecutorTest.xml

index 98b7121355042c355f817782e36574c1762a6677..4ef4be1fb1ff69a0aa1227ecbaf566384651074c 100644 (file)
@@ -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
             {
index 5b212f6e9d88f0e2e5d35b5a9bd7248d5d07a99f..17d200f5c0c004ffb2cc1d4f0bcbb49624071b4d 100644 (file)
           <role-hint>jdo</role-hint>
           <field-name>repositoryDAO</field-name>
         </requirement>
-         <requirement>
+        <requirement>
           <role>org.apache.maven.archiva.consumers.ArchivaArtifactConsumer</role>
-          <field-name>availableConsumers</field-name>
+          <field-name>availableDBConsumers</field-name>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.archiva.consumers.RepositoryContentConsumer</role>
+          <field-name>availableRepositoryConsumers</field-name>
         </requirement>
       </requirements>
     </component>