aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-10-10 17:14:19 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-10-10 17:14:19 +0200
commit28cbbca7f248ce635537e4368a8c167edff095cb (patch)
treeac21d542011cee5538afa7e7a107b8bbd783d6f1
parent1e5d6794b55293419c9843242a47d059cd3c2c94 (diff)
downloadsonarqube-28cbbca7f248ce635537e4368a8c167edff095cb.tar.gz
sonarqube-28cbbca7f248ce635537e4368a8c167edff095cb.zip
SONAR-2861 fix loading of property sonar.skippedModules
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java
index 7d9524ca93b..06ec2bd23fd 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import org.sonar.api.batch.bootstrap.ProjectBuilder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.bootstrap.ProjectReactor;
+import org.sonar.api.config.Settings;
import org.sonar.api.resources.Project;
import java.io.IOException;
@@ -40,17 +41,21 @@ public class ProjectTree {
private List<Project> projects;
private Map<ProjectDefinition, Project> projectsByDef;
+ private Settings settings;
public ProjectTree(ProjectReactor projectReactor, //NOSONAR the unused parameter 'builders' is used for the startup order of components
ProjectConfigurator projectConfigurator,
+ Settings settings,
/* Must be executed after ProjectBuilders */ ProjectBuilder[] builders) {
- this(projectReactor, projectConfigurator);
+ this(projectReactor, projectConfigurator, settings);
}
public ProjectTree(ProjectReactor projectReactor, //NOSONAR the unused parameter 'builders' is used for the startup order of components
- ProjectConfigurator projectConfigurator) {
+ ProjectConfigurator projectConfigurator,
+ Settings settings) {
this.projectReactor = projectReactor;
this.configurator = projectConfigurator;
+ this.settings = settings;
}
ProjectTree(ProjectConfigurator configurator) {
@@ -89,8 +94,8 @@ public class ProjectTree {
void applyExclusions() {
for (Project project : projects) {
- String[] excludedArtifactIds = project.getConfiguration().getStringArray("sonar.skippedModules");
- String[] includedArtifactIds = project.getConfiguration().getStringArray("sonar.includedModules");
+ String[] excludedArtifactIds = settings.getStringArray("sonar.skippedModules");
+ String[] includedArtifactIds = settings.getStringArray("sonar.includedModules");
Set<String> includedModulesIdSet = Sets.newHashSet();
Set<String> excludedModulesIdSet = Sets.newHashSet();