in src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java [1109:1142]
private boolean isValidGeneratedReportXdoc(String fullGoal, File generatedReport, String localReportName) {
SinkAdapter sinkAdapter = new SinkAdapter();
try (Reader reader = ReaderFactory.newXmlReader(generatedReport)) {
doxia.parse(reader, "xdoc", sinkAdapter);
} catch (ParseException e) {
String sb = EOL
+ "Error when parsing the generated report xdoc file: "
+ generatedReport.getAbsolutePath() + EOL
+ e.getMessage() + EOL
+ "You could:" + EOL
+ " * exclude all reports using -DincludeReports=false" + EOL
+ " * remove the "
+ fullGoal
+ " from the <reporting/> part. To not affect the site generation, "
+ "you could create a PDF profile." + EOL
+ "Ignoring the \"" + localReportName + "\" report in the PDF." + EOL;
getLog().error(sb);
getLog().debug(e);
return false;
} catch (ParserNotFoundException e) {
getLog().error("ParserNotFoundException: " + e.getMessage());
getLog().debug(e);
return false;
} catch (IOException e) {
getLog().error("IOException: " + e.getMessage());
getLog().debug(e);
return false;
}
return true;
}