From 57dbb0d2a9b9ac786f2a19ad9be1635e03da911c Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 9 Apr 2014 14:33:57 +0200 Subject: [PATCH] SONAR-5109 Deprecate properties sonar.skippedModules and sonar.includedModules --- .../main/java/org/sonar/batch/scan/ProjectExclusions.java | 8 ++++++++ .../src/main/java/org/sonar/api/CoreProperties.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectExclusions.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectExclusions.java index 9f29fe2cafd..9ae79832e12 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectExclusions.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectExclusions.java @@ -60,6 +60,14 @@ public class ProjectExclusions implements TaskComponent { public void apply() { if (!reactor.getProjects().isEmpty() && StringUtils.isNotBlank(reactor.getProjects().get(0).getKey())) { LOG.info("Apply project exclusions"); + + if (settings.hasKey(CoreProperties.CORE_INCLUDED_MODULES_PROPERTY)) { + LOG.warn("'sonar.includedModules' property is deprecated since version 4.3 and should not be used anymore."); + } + if (settings.hasKey(CoreProperties.CORE_SKIPPED_MODULES_PROPERTY)) { + LOG.warn("'sonar.skippedModules' property is deprecated since version 4.3 and should not be used anymore."); + } + for (ProjectDefinition project : reactor.getProjects()) { if (isExcluded(key(project), project == reactor.getRoot())) { exclude(project); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java index ef9b5f6eb51..7c1ed5e91f1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java @@ -199,13 +199,21 @@ public interface CoreProperties { String CORE_VIOLATION_LOCALE_DEFAULT_VALUE = "en"; String CORE_IMPORT_SOURCES_PROPERTY = "sonar.importSources"; boolean CORE_IMPORT_SOURCES_DEFAULT_VALUE = true; + + /** + * @deprecated since 4.3. See http://jira.codehaus.org/browse/SONAR-5109 + */ + @Deprecated String CORE_SKIPPED_MODULES_PROPERTY = "sonar.skippedModules"; + String CORE_RULE_WEIGHTS_PROPERTY = "sonar.core.rule.weight"; String CORE_RULE_WEIGHTS_DEFAULT_VALUE = "INFO=0;MINOR=1;MAJOR=3;CRITICAL=5;BLOCKER=10"; /** * @since 4.0 + * @deprecated since 4.3. See http://jira.codehaus.org/browse/SONAR-5109 */ + @Deprecated String CORE_INCLUDED_MODULES_PROPERTY = "sonar.includedModules"; /** -- 2.39.5