+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <!-- Specific to generate mapping between tests and covered code -->
+ <argLine>${jacoco.agent.it.arg}</argLine>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.sonar.java.jacoco.JUnitListener</value>
+ </property>
+ </properties>
+ <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+ <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- Specific to generate mapping between tests and covered code -->
+ <argLine>${jacoco.agent.ut.arg}</argLine>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.sonar.java.jacoco.JUnitListener</value>
+ </property>
+ </properties>
+ </configuration>
+ </plugin>