Hello Team,
We have integrated Azure Devops with SonarQube which are Java Applications building from Azure pipelines. We are using Jfrog Maven task to build shared libraries, publising artifacts to Jfrog Artifactory & scanning code from SonarQube by using “Prepare analysis on SonarQube, Run code Analysis, publish Quality Gate Results”. Everything working fine. But only issue is code coverage is 0% for all the applications. So i have tried to install Jacoco plugin from POM.XML, it got istalled successfully by using below code. But still it is showing 0% coverage. Am i missing any Configurations ? Can any one help on this ?
Code :
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- attached to Maven test phase -->
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
SonarQube Version : Enterprize Edition: 9.9
Thanks in Advance,
Best Regards
Revathi