Hi Everyone,
I was trying to achieve the coverage report generation on sonarqube
platform for one of our project. Below are the details.
1. I've a multi module (4 modules) maven project which has the junit test
cases written for a single module. I use TeamCity as a CI tool to get the
code compiled and perform the cpde coverage through Jacoco plugin (which
was written on parent pom.xml file).
2. Whenever I trigger a build, the sonarqube scan process gets started and
coverage report doesnt get reflect on sonarqube platform. The build doesnt
fail, but never shows the coverage report on sonarqube platform.
3. I've defined the properties on every module as well.
4. Below is the plugin details defined in parent pom.xml file and
properties alonein child pom.xml files
---------------properties-child pom-----------
<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}
</sonar.coverage.jacoco.xmlReportPaths>
</properties>
---------------Plugin- parent pom------------------
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
</plugin>
</plugins>
profiles>
<profile>
<id>coverage</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles> Can someone please let me know is there anything I'm missing to
reflect the code coverage part ? I uses the sonarqube 7.9.1 version, the
master branch was first analyzed. Below is the command I passes through
TeamCity command - clean verify sonar:sonar Looking forward at your
response. -Mohan
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/f107bdef-4a6d-4f5e-8681-870ad46f75e6%40googlegroups.com.