Questions tagged [maven-cobertura-plugin]

This tag is for questions related to the maven plugin that executes the Cobertura code coverage utility.

This tag is for questions related to the maven plugin that executes the Cobertura code coverage utility. It can generate a report about the coverages of junit tests in your project.

79 questions
18
votes
3 answers

cobertura-maven-plugin with Java 8

Is it just me or the cobertura-maven-plugin doesn't work with java 8? when it runs I get [INFO] --- cobertura-maven-plugin:2.6:instrument (default) @ provider-impl --- [INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT…
Hilikus
  • 8,557
  • 12
  • 57
  • 100
8
votes
2 answers

Cobertura gives Argument list too long

I am trying to generate code coverage reports using cobertura plugin. I have this dependency in my pom.xml org.codehaus.mojo cobertura-maven-plugin 2.6
user2973475
  • 329
  • 1
  • 2
  • 11
7
votes
3 answers

Cobertura Maven Plugin fails with "The command line is too long" on Windows

When I run cobertura-maven-plugin on Windows 8.1 with lengthy configuration (used to prohibit any coverage drop in the project) cobertura:check goal fails with error The command line is too long. The problem is probably connected to Command prompt…
Michal Kordas
  • 9,161
  • 7
  • 42
  • 81
6
votes
4 answers

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: 3.2:sonar

Can anyone help me in getting solution for the below error. Below are the version of the components to configure SonarQube 5.1.2 Soanr-Runner 2.4 Java 1.7 [ I have to use 1.7 only since my code supports only 1.7] mavn…
Ron
  • 1,024
  • 4
  • 24
  • 52
6
votes
1 answer

Maven Cobertura and Package without running Unit Tests Twice

I am running maven like this: mvn clean cobertura:cobertura package I am noticing that my unit tests get run twice (thus doubling my build time). Is there a way to run cobertura AND generate the package in the same command without running tests…
hofan41
  • 1,408
  • 11
  • 25
5
votes
0 answers

CI job failing with error - Unable to execute Cobertura. Cannot run program "/bin/sh": error=7, Argument list too long

Here is the complete error failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.6:instrument (default) on project besinapp: Unable to execute Cobertura. Error while executing process. Cannot run program "/bin/sh": error=7, Argument…
Ganga.K
  • 51
  • 2
5
votes
1 answer

Why is code coverage zero with Scalatest, Maven and cobertura?

I am trying to get Cobertura to work on a really simple example project with Maven and Scala. Here is my pom: EDIT: Meanwhile, I found out that this pom is rather bad. If you're looking for a better example, see the one in the accepted…
Kathi
  • 191
  • 12
5
votes
3 answers

Cobertura causes ClassNotFoundException

When building my project with maven using JUnit-Tests with surefire and Cobertura to get test coverage, normally, everything worked fine. But when I recently added an exception that could be thrown (and is excepted) by some tests, maven always told…
4
votes
0 answers

How to Integrate multiple unit test reports with SonarQube

I have couple of Maven projects in my build. Each project has its unit test cases. I would like to execute those test cases & report the consolidated results on SonarQube Server. I am on SonarQube 5.6. As there are multiple Cobertura reports to…
4
votes
1 answer

Does cobertura support java 8 ?Because i want to use java8 labmda expression and it is giving me an error

I am new Cobertura I have written Test case and I use Lambda expression in coding and it is giving me an error how to solve this issue. I search on google and came to know that Jacoco support Java8. But how to insert jacoco plugin as Cobertura …
4
votes
2 answers

Code Coverage: Cobertura and SonarQube 5.3 Maven Integration

We are migrating all the project from ANT to MAVEN as part of Continuous Integration. We are using JaCoCo for new project to measure the code coverage and integrated successfully with SonarQube. We have few existing ANT project which is using…
4
votes
1 answer

Generating multiple Cobertura report formats via Maven command line

With Maven I can generate multiple different types of code coverage reports with Cobertura by changing the reporting section of my POM, ala ... org.codehaus.mojo cobertura-maven-plugin
ingyhere
  • 8,842
  • 3
  • 28
  • 41
4
votes
1 answer

SonarQube 4.4 not displaying cobertura unit tests or code coverage for grails 2.4.3 with spock tests

I have SonarQube 4.4 installed on my machine. I am trying to generate metrics for a grails (2.4.3) project that has tests written in Spock framework. However, sonar does not show unit tests results or unit tests coverage. I verified that cobertura…
RRK
  • 465
  • 2
  • 7
  • 21
4
votes
3 answers

Tests running twice when using cobertura and maven site plugin

I am using maven site plugin and cobertura together to run unit tests and generate report. Everything is working fine , but only problem is all unit tests are running twice. I tried to set forkMode as never for maven-site-plugin but even then I am…
Saravanan S
  • 947
  • 9
  • 24
4
votes
1 answer

Cobertura Java7 try with resource

i'm using cobertura 2.6 with maven on java 1.7 org.codehaus.mojo cobertura-maven-plugin 2.6
wutzebaer
  • 12,445
  • 18
  • 77
  • 144
1
2 3 4 5 6