First of all:
As stated in JaCoCo documentation ( 
https://www.jacoco.org/jacoco/trunk/doc/integrations.html ) integration 
with SonarQube is third-party and not developed by JaCoCo team.
And all questions about third-party integrations should be addressed to 
vendors of these integrations.

Nevertheless:
as shown in 
https://community.sonarsource.com/t/coverage-test-data-importing-jacoco-coverage-report-in-xml-format/12151
property "sonar.coverage.jacoco.xmlReportPaths" should point to XML file(s) 
with report(s), not to directory
in your pom.xml snippets there are no traces of 
https://www.jacoco.org/jacoco/trunk/doc/report-mojo.html that generates XML 
report


On Tuesday, April 14, 2020 at 2:10:30 PM UTC+2, Mohan Reddy wrote:
>
> 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/7ba0324a-0588-4b26-ab7d-1192a9c825cd%40googlegroups.com.

Reply via email to