From 96dcc113d6c8de43d4b03228bb298a022b51002b Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Wed, 29 Dec 2010 21:48:07 +0000 Subject: [PATCH] dbcleaner plugin: Change default value for cutoff beyond which we suppress all snapshots to 60 months --- .../main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java | 2 +- .../org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java | 2 +- .../main/java/org/sonar/plugins/dbcleaner/period/Periods.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java index 52ada4d313c..db78d972fa3 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java @@ -40,7 +40,7 @@ import java.util.List; defaultValue = DbCleanerConstants.ONE_YEAR, name = "Number of months before starting to keep only one snapshot by month", description = "After this number of months, if there are several snapshots during the same month, " + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true), - @Property(key = DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, defaultValue = DbCleanerConstants.THREE_YEARS, + @Property(key = DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, defaultValue = DbCleanerConstants.FIVE_YEARS, name = "Number of months before starting to delete all remaining snapshots", description = "After this number of months, all snapshots are fully deleted.", global = true, project = true)}) public final class DbCleanerPlugin implements Plugin { diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java index d39e0ae0db1..2cf8f0d063b 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java @@ -28,5 +28,5 @@ public interface DbCleanerConstants { String MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS = "sonar.dbcleaner.monthsBeforeDeletingAllSnapshots"; String ONE_MONTH = "1"; String ONE_YEAR = "12"; - String THREE_YEARS = "36"; + String FIVE_YEARS = "60"; } diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java index 19abce77db5..a852c4d17b4 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java @@ -47,7 +47,7 @@ public final class Periods { dateToStartKeepingOneSnapshotByMonth = getDate(project.getConfiguration(), DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH, DbCleanerConstants.ONE_YEAR); dateToStartDeletingAllSnapshots = getDate(project.getConfiguration(), DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, - DbCleanerConstants.THREE_YEARS); + DbCleanerConstants.FIVE_YEARS); } void log() { -- 2.39.5