aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-04-28 14:34:51 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-28 14:34:51 +0400
commitc8dd1e72592de2dbeef28a2ab03f045eab74e4fb (patch)
tree5214cc713350c1afd63f61ea9f76d0883b94c8fa
parent1ecf4a54440019d5f14bae01742ba6b3634006ba (diff)
downloadsonarqube-c8dd1e72592de2dbeef28a2ab03f045eab74e4fb.tar.gz
sonarqube-c8dd1e72592de2dbeef28a2ab03f045eab74e4fb.zip
Force creation of project workDir
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
index 00c85b67ccb..90e8ec2e658 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultProjectFileSystem2.java
@@ -154,18 +154,18 @@ public class DefaultProjectFileSystem2 extends DefaultProjectFileSystem {
@Override
public File getSonarWorkingDirectory() {
+ File dir;
if (pom != null) {
- try {
- File dir = new File(getBuildDir(), "sonar");
- FileUtils.forceMkdir(dir);
- return dir;
-
- } catch (IOException e) {
- throw new SonarException("Unable to retrieve Sonar working directory.", e);
- }
+ dir = new File(getBuildDir(), "sonar");
} else {
- return def.getWorkDir();
+ dir = def.getWorkDir();
+ }
+ try {
+ FileUtils.forceMkdir(dir);
+ } catch (IOException e) {
+ throw new SonarException("Unable to retrieve Sonar working directory.", e);
}
+ return dir;
}
}