From cd10c1cde834b98445b95c7ddd9818da79098bc4 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 8 Sep 2011 15:13:58 +0000 Subject: [PATCH] [MRM-1513] Remove DatabaseScanningConfiguration fields git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1166734 13f79535-47bb-0310-9956-ffa450edef68 --- .../DefaultArchivaConfiguration.java | 24 +------- .../src/main/mdo/configuration.mdo | 55 ------------------- .../ArchivaConfigurationTest.java | 26 --------- 3 files changed, 2 insertions(+), 103 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java index dab62ab34..7e68ff9c6 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java @@ -494,18 +494,7 @@ public class DefaultArchivaConfiguration section.removeSubset( "repositoryScanning.invalidContentConsumers" ); } } - if ( configuration.getDatabaseScanning() != null ) - { - if ( configuration.getDatabaseScanning().getCleanupConsumers().isEmpty() && section != null ) - { - section.removeSubset( "databaseScanning.cleanupConsumers" ); - } - if ( configuration.getDatabaseScanning().getUnprocessedConsumers().isEmpty() && section != null ) - { - section.removeSubset( "databaseScanning.unprocessedConsumers" ); - } - } new ConfigurationRegistryWriter().write( configuration, section ); section.save(); @@ -522,11 +511,7 @@ public class DefaultArchivaConfiguration c.setRefreshCronExpression( escapeCronExpression( c.getRefreshCronExpression() ) ); } - DatabaseScanningConfiguration scanning = configuration.getDatabaseScanning(); - if ( scanning != null ) - { - scanning.setCronExpression( escapeCronExpression( scanning.getCronExpression() ) ); - } + } private Registry createDefaultConfigurationFile() @@ -735,12 +720,7 @@ public class DefaultArchivaConfiguration c.setRefreshCronExpression( unescapeCronExpression( c.getRefreshCronExpression() ) ); } - DatabaseScanningConfiguration databaseScanning = config.getDatabaseScanning(); - if ( databaseScanning != null ) - { - String cron = databaseScanning.getCronExpression(); - databaseScanning.setCronExpression( unescapeCronExpression( cron ) ); - } + return config; } diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo index 4b3a74b88..c31a7e531 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo @@ -136,17 +136,6 @@ The repository scanning configuration. - - databaseScanning - 1.0.0+ - - DatabaseScanningConfiguration - 1 - - - The database scanning configuration. - - webapp 1.0.0+ @@ -1076,50 +1065,6 @@ - - DatabaseScanningConfiguration - 1.0.0+ - - The scanning configuration for unprocessed ArchivaArtifact database objects. - - - - cronExpression - 1.0.0+ - String - When to run the database scanning mechanism. Default is every two hours on the hour. - - 0 0 0/2 * * ? - - - unprocessedConsumers - 1.0.0+ - true - - String - * - - - The list of consumers for the unprocessed ArchivaArtifact database objects. - - - - cleanupConsumers - 1.0.0+ - true - true - - String - * - - - The list of consumers for previously processed ArchivaArtifact database - objects that no longer exist on the filesystem, and might need to - undergo a cleanup. - - - -