aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api/src/test/java')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java
index a681327409e..3afd4569eb8 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java
@@ -76,7 +76,9 @@ public final class MavenTestUtils {
fs.addTestDir(dir);
}
project.getConfiguration().setProperty("project.build.outputDirectory", pom.getBuild().getOutputDirectory());
- project.getConfiguration().setProperty("project.reporting.outputDirectory", pom.getReporting().getOutputDirectory());
+ if (pom.getReporting() != null) {
+ project.getConfiguration().setProperty("project.reporting.outputDirectory", pom.getReporting().getOutputDirectory());
+ }
fs.setBaseDir(project.getPom().getBasedir());
fs.setBuildDir(project.getPom().getBuild().getDirectory());
return project;