Fix Sonar integration
[yangtools.git] / yang / yang-maven-plugin-it / pom.xml
index 3deeff1046e091af6ab156236a2ddb8637600dd3..39a2ee989e284f6cbef1cbd17987b0a4643ddd25 100644 (file)
@@ -44,6 +44,7 @@
 
     <properties>
         <it-project.version>${project.version}</it-project.version>
+        <sonar.jacoco.reportPath>${project.basedir}/../../target/jacoco.exec</sonar.jacoco.reportPath>
     </properties>
 
     <build>
                     <failOnError>true</failOnError>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>pre-unit-test</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <destFile>${project.build.directory}/code-coverage/jacoco.exec</destFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>