Fix Sonar integration
[yangtools.git] / yang / yang-common / pom.xml
index f3ce1028bb1b3c8f3661472b4d309cad6465a830..9f3e561a7ef7ac6d7a0c79e2ad684b7d9aa05b90 100644 (file)
     <name>${project.artifactId}</name>
     <description>ODL :: YANG Tools :: ${project.artifactId}</description>
 
+    <properties>
+        <sonar.jacoco.reportPath>${project.basedir}/../../target/jacoco.exec</sonar.jacoco.reportPath>
+    </properties>
+
     <dependencyManagement>
         <dependencies>
             <dependency>
                     <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>