From: Julien HENRY Date: Tue, 2 Dec 2014 11:08:46 +0000 (+0100) Subject: Revert SONARUNNER-124 as it was a misunderstanding X-Git-Tag: 2.5-rc1~98 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78020aefc3f16277a2ec1a19077384a8cbd9eb11;p=sonar-scanner-cli.git Revert SONARUNNER-124 as it was a misunderstanding --- diff --git a/sonar-runner-dist/src/main/java/org/sonar/runner/Conf.java b/sonar-runner-dist/src/main/java/org/sonar/runner/Conf.java index f6301ae..6ba9d72 100644 --- a/sonar-runner-dist/src/main/java/org/sonar/runner/Conf.java +++ b/sonar-runner-dist/src/main/java/org/sonar/runner/Conf.java @@ -97,7 +97,7 @@ class Conf { File parentBaseDir = new File(parentProps.getProperty(PROPERTY_PROJECT_BASEDIR)); if (parentProps.containsKey(PROPERTY_MODULES)) { for (String module : getListFromProperty(parentProps, PROPERTY_MODULES)) { - Properties moduleProps = extractModuleProperties(module, projectProps); + Properties moduleProps = extractModuleProperties(module, parentProps); moduleProps = loadChildConfigFile(parentBaseDir, moduleProps, module); // the child project may have children as well diff --git a/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java b/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java index 946d843..35bbfbf 100644 --- a/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java +++ b/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java @@ -99,8 +99,8 @@ public class ConfTest { Properties properties = conf.properties(); assertThat(properties.getProperty("1.sonar.projectName")).isEqualTo("Module 1"); - assertThat(properties.getProperty("11.sonar.projectName")).isEqualTo("Module 11"); - assertThat(properties.getProperty("12.sonar.projectName")).isEqualTo("Module 12"); + assertThat(properties.getProperty("1.11.sonar.projectName")).isEqualTo("Module 11"); + assertThat(properties.getProperty("1.12.sonar.projectName")).isEqualTo("Module 12"); assertThat(properties.getProperty("2.sonar.projectName")).isEqualTo("Module 2"); } diff --git a/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties b/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties index 33221bf..5271377 100644 --- a/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties +++ b/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties @@ -2,10 +2,10 @@ sonar.modules=1,2 1.sonar.projectName=Module 1 1.sonar.projectBaseDir=module1 1.sonar.modules=11,12 -11.sonar.projectBaseDir=module11 -11.sonar.projectName=Module 11 -12.sonar.projectBaseDir=module12 -12.sonar.projectName=Module 12 +1.11.sonar.projectBaseDir=module11 +1.11.sonar.projectName=Module 11 +1.12.sonar.projectBaseDir=module12 +1.12.sonar.projectName=Module 12 2.sonar.projectName=Module 2 2.sonar.projectBaseDir=module2 \ No newline at end of file