From 33163662877cc31bbf1b6813971537e8ffd4fee7 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Thu, 9 Nov 2017 19:11:21 +0100 Subject: [PATCH] Fixing recursive call for stage repos --- .../apache/archiva/repository/RepositoryRegistry.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java index e1d4787b8..557ee9ea8 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java @@ -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 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) { } + + + } -- 2.39.5