Maven plugin cobertura example is not working

402 views
Skip to first unread message

kuba.bo...@gmail.com

unread,
Nov 4, 2015, 10:44:50 AM11/4/15
to SonarQube
Hi,
 when I set -Dsonar.cobertura.reportPath=target/cobertura/cobertura.ser  as per example here https://github.com/SonarSource/sonar-examples/blob/master/projects/languages/java/code-coverage/ut/ut-maven-cobertura/pom.xml I get

[INFO] [16:28:39.355] Sensor CoberturaSensor
[INFO] [16:28:39.355] parsing /home/egnyte/common_core/target/cobertura/cobertura.ser
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:00 min
[INFO] Finished at: 2015-11-04T16:28:39+01:00
[INFO] Final Memory: 37M/761M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project common_core: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0xac (at char #1, byte #-1)

Simon Brandhof

unread,
Nov 5, 2015, 12:59:27 AM11/5/15
to kuba.bo...@gmail.com, SonarQube
Hi Kuba,

Please provide the version of Cobertura plugin then see if this thread can help you:

Regards


Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/bf47842a-90d5-4f49-8849-1e898dd4d9a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kuba.bo...@gmail.com

unread,
Nov 6, 2015, 8:33:37 AM11/6/15
to SonarQube, kuba.bo...@gmail.com
I'm using the lastest cobertura-maven-plugin v 2.7, which is using cobertura 2.1.1

I'm running mvn cobertura:cobertura && mvn  sonar:sonar -Dsonar.cobertura.reportPath=target/cobertura/cobertura.ser

If I drop the -Dsonar.cobertura.reportPath=target/cobertura/cobertura.ser it works fine

kuba.bo...@gmail.com

unread,
Dec 29, 2015, 11:16:25 AM12/29/15
to SonarQube, kuba.bo...@gmail.com
Hello?
 Will somebody from sonar team respond to this?

I feel like a sucker - I've sent you 5 sensible, well documented reports of obvious problems and there is no reaction for weeks.

Not only the example is wrong, but also the documentation http://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project  states that it's supposed to be "the property to the path of the Cobertura .ser report."

Simon Brandhof

unread,
Jan 4, 2016, 4:08:15 AM1/4/16
to Jakub Bocheński, SonarQube
Hi Kuba,

No need to be rude, you're on a community-driven group.
To help investigating your problem, please :


Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

Anup Ghosh

unread,
Jun 29, 2016, 5:06:37 AM6/29/16
to SonarQube, kuba.bo...@gmail.com
Although the post is old but I too faced the same issue. I posed a solution here.

Jakub Bocheński

unread,
Jun 29, 2016, 5:40:15 AM6/29/16
to Anup Ghosh, SonarQube
I think it's telling sonar team still didn't correct the glaring problems with their examples and documentation after 9 months.

Jakub Bocheński

Alexandre Gigleux

unread,
Jun 30, 2016, 10:20:53 AM6/30/16
to SonarQube, akghosh...@gmail.com, kuba.bo...@gmail.com
Reply all
Reply to author
Forward
0 new messages