public static File getReport(Project project, MavenProject mavenProject, String file) {
    File report = getReportFromPluginConfiguration(project, mavenProject, file);
    if (report == null) {
      report = getReportFromDefaultPath(project, file);
    }

    if (report == null || !report.exists() || !report.isFile()) {
      Logs.INFO.warn("PomQuality report not found at {}", report);
      report = null;
    }
    return report;
  }
Beispiel #2
0
  public void analyse(Project project, SensorContext context) {
    if (project.getReuseExistingRulesConfig()) {
      Logs.INFO.warn("Reusing existing PMD configuration is not supported any more.");
    }
    try {
      File xmlReport = executor.execute();
      getStaxParser(project, context).parse(xmlReport);

    } catch (Exception e) {
      // TOFIX
      throw new XmlParserException(e);
    }
  }