[Feature Request] Please fail pipeline when jacoco.xml couldnt be read (é)

Using: sonar-maven-plugin:3.9.1.2184:sonar

I would like to request that if the sonarscanner cannot read an jacoco.xml due to a IllegalStateException or a XMLStreamException that the maven build would fail
This error did not stop the build and therefore gave a very low test coverage:

**08:29:51** java.lang.IllegalStateException: Failed to parse JaCoCo XML report: D:\Node_W3\workspace\my-ci_feature-1304\domein\target\jacoco-reports\IT\jacoco.xml 
**08:29:51** at org.sonar.plugins.jacoco.XmlReportParser.parse(XmlReportParser.java:108)
...
**08:29:51** Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1507107] **08:29:51** Message: Input length = 1 
**08:29:51** at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:647) 
**08:29:51** at org.sonar.plugins.jacoco.XmlReportParser.parse(XmlReportParser.java:61)

This error was caused by a method with a CP-1252 character 0xE9h in the name of a java-method.
The é was slipped in the code. And the error message did not point to the correct offset in the jacoco.xml so searching for this error was a bit long.

Is it possible that this error will stop the maven-build?
I hope this request can be taken into consideration.

Thanks in advance.

Hey @CasperNLD,

Thanks for your patience. Many of our analyzers are already supporting a property (sonar.internal.analysis.failFast) that allows users to tell the analyzers to fail their analysis at the first error encountered. The property is mainly thought for Sonar’s internal use but can be used for what you try to achieve.

The JaCoCo XML report importer does not yet support the property, but I created the following ticket to bring its support: JACOCO-19

There is no sprint planned on the JaCoCo plugin so far, but we will tackle the ticket next time we work on it (no ETA).

Cheers,
Michael