]> source.dussan.org Git - archiva.git/commitdiff
Fixing recursive call for stage repos
authorMartin Stockhammer <martin.stockhammer@ars.de>
Thu, 9 Nov 2017 18:11:21 +0000 (19:11 +0100)
committerMartin Stockhammer <martin.stockhammer@ars.de>
Thu, 9 Nov 2017 18:11:21 +0000 (19:11 +0100)
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java

index e1d4787b8f30d572e5afeae6a408fce37cf1f000..557ee9ea8a07bec0bd5cae60f2239304de001d9e 100644 (file)
@@ -26,6 +26,8 @@ import org.apache.archiva.configuration.ConfigurationListener;
 import org.apache.archiva.configuration.IndeterminateConfigurationException;
 import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.archiva.configuration.RemoteRepositoryConfiguration;
+import org.apache.archiva.indexer.ArchivaIndexingContext;
+import org.apache.archiva.indexer.IndexManagerFactory;
 import org.apache.archiva.redback.components.registry.RegistryException;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.apache.archiva.repository.features.StagingRepositoryFeature;
@@ -66,6 +68,9 @@ public class RepositoryRegistry implements ConfigurationListener {
     @Inject
     List<RepositoryProvider> repositoryProviders;
 
+    @Inject
+    IndexManagerFactory indexManagerFactory;
+
     @Inject
     ArchivaConfiguration archivaConfiguration;
 
@@ -201,6 +206,9 @@ public class RepositoryRegistry implements ConfigurationListener {
         if ( stageRepo == null )
         {
             stageRepo = provider.createStagingInstance( baseRepoCfg );
+            if (stageRepo.supportsFeature(StagingRepositoryFeature.class)) {
+                stageRepo.getFeature(StagingRepositoryFeature.class).get().setStageRepoNeeded(false);
+            }
             ManagedRepositoryConfiguration stageCfg = provider.getManagedConfiguration( stageRepo );
             updateRepositoryReferences( provider, stageRepo, stageCfg, configuration);
         }
@@ -900,4 +908,7 @@ public class RepositoryRegistry implements ConfigurationListener {
     public void configurationEvent(ConfigurationEvent event) {
 
     }
+
+
+
 }