aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-07 17:24:58 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-07 17:24:58 +0100
commitd0800d6cf57e2ae41ce972c1e03c4129bfef01a8 (patch)
treed86e14453dd1c434bf95b6f81ab70a0a6c838ca7 /src/main/java
parent51bd30be5e9e33dcf26126b74ace304ee839d1e0 (diff)
downloadsonar-scanner-cli-d0800d6cf57e2ae41ce972c1e03c4129bfef01a8.tar.gz
sonar-scanner-cli-d0800d6cf57e2ae41ce972c1e03c4129bfef01a8.zip
SONARPLUGINS-2421 Make it possible to define a multi-modules project whose modules share the same project base directory
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/sonar/runner/internal/batch/SonarProjectBuilder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/sonar/runner/internal/batch/SonarProjectBuilder.java b/src/main/java/org/sonar/runner/internal/batch/SonarProjectBuilder.java
index 40e715f..60ddfb1 100644
--- a/src/main/java/org/sonar/runner/internal/batch/SonarProjectBuilder.java
+++ b/src/main/java/org/sonar/runner/internal/batch/SonarProjectBuilder.java
@@ -193,7 +193,13 @@ public final class SonarProjectBuilder {
if (moduleProps.containsKey(PROPERTY_PROJECT_BASEDIR)) {
File baseDir = getFileFromPath(moduleProps.getProperty(PROPERTY_PROJECT_BASEDIR), parentProject.getBaseDir());
setProjectBaseDir(baseDir, moduleProps, moduleId);
- tryToFindAndLoadPropsFile(baseDir, moduleProps, moduleId);
+ try {
+ if (!parentProject.getBaseDir().getCanonicalFile().equals(baseDir.getCanonicalFile())) {
+ tryToFindAndLoadPropsFile(baseDir, moduleProps, moduleId);
+ }
+ } catch (IOException e) {
+ throw new RunnerException("Error when resolving baseDir", e);
+ }
} else if (moduleProps.containsKey(PROPERTY_PROJECT_CONFIG_FILE)) {
loadPropsFile(parentProject, moduleProps, moduleId);
} else {