Sonarqube LTS version 9.9. Sonarqube deployed on a VM
I have a project with 3 modules: module 1, module 2, module 3. I’m using the maven plugin. So there is a pom.xml at the root level and one pom.xml each in the modules. Module 2 is completely integration tests. Module 1 pom’s parent pom is the spring framework one. So i created an aggregate project whose pom aggregates the report from the individual modules. something like the one below.
I get coverage for modules 1 and 3 but not for module 2 which is the integration tests module. Do i have to do anything different to get integration tests coverage?
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>${project.artifactId}-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>${project.artifactId}-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>${project.artifactId}-report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<dataFileIncludes>
<dataFileInclude>**/jacoco.exec</dataFileInclude>
</dataFileIncludes>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-aggregate</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>