fs.setBaseDir(pom.getBasedir());
fs.setBuildDir(pom.getBuild().getDirectory());
projectConfiguration.setProperty("project.build.outputDirectory", pom.getBuild().getOutputDirectory());
- projectConfiguration.setProperty("project.reporting.outputDirectory", pom.getReporting().getOutputDirectory());
+ if (pom.getReporting() != null) {
+ projectConfiguration.setProperty("project.reporting.outputDirectory", pom.getReporting().getOutputDirectory());
+ }
projectConfiguration.setProperty("sonar.java.sourceVersion", MavenUtils.getJavaSourceVersion(pom));
projectConfiguration.setProperty("sonar.java.targetVersion", MavenUtils.getJavaVersion(pom));
}
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;