From a91035bdbfd113ff05f1d6b28833d08017c3622a Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 21 Jan 2013 10:29:55 +0100 Subject: [PATCH] SONAR-4069 Fix issue with configuration when using old API (without task) --- .../src/main/java/org/sonar/batch/bootstrapper/Batch.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java index 1918abaf85e..cbab3ddb416 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java @@ -52,6 +52,10 @@ public final class Batch { if (builder.globalProperties != null) { globalProperties.putAll(builder.globalProperties); } + else { + // For backward compatibility, previously all properties were set in root project + globalProperties.putAll(Maps.fromProperties(builder.projectReactor.getRoot().getProperties())); + } this.taskCommand = builder.taskCommand; projectReactor = builder.projectReactor; if (builder.isEnableLoggingConfiguration()) { -- 2.39.5