Skip to content

Commit

Permalink
Merge pull request #6 from scosenz/patch-1
Browse files Browse the repository at this point in the history
Fix NoSuchMethodException in getReportsDirectory
  • Loading branch information
mmarich committed Feb 12, 2014
2 parents 2d1085f + 3ea8c2b commit dcadbb4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.CoverageExtension;
import org.sonar.api.batch.DependsUpon;
import org.sonar.api.batch.Sensor;
Expand Down Expand Up @@ -48,8 +49,9 @@ public boolean shouldExecuteOnProject(Project project) {
}

public void analyse(Project project, SensorContext context) {
File dir = SurefireUtils.getReportsDirectory(project);
collect(project, context, dir);
String path = (String) project.getProperty(CoreProperties.SUREFIRE_REPORTS_PATH_PROPERTY);
File pathFile = project.getFileSystem().resolvePath(path);
collect(project, context, pathFile);
}

protected void collect(Project project, SensorContext context, File reportsDir) {
Expand Down

0 comments on commit dcadbb4

Please sign in to comment.