Skip to content

Commit f5ca511

Browse files
author
Opqtech
committed
added jacoco plugin in pom.xml
1 parent 72d86f3 commit f5ca511

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<properties>
1010
<maven.compiler.source>1.6</maven.compiler.source>
1111
<maven.compiler.target>1.6</maven.compiler.target>
12+
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/target/site/jacoco/jacoco.xml<sonar.coverage.jacoco.xmlReportPaths>
1213
</properties>
1314
<dependencies>
1415
<dependency>
@@ -54,6 +55,38 @@
5455
</execution>
5556
</executions>
5657
</plugin>
58+
<plugin>
59+
<groupId>io.github.robb3n</groupId>
60+
<artifactId>sonar-quality-gate-maven-plugin</artifactId>
61+
<version>1.3.0</version>
62+
</plugin>
63+
<plugin>
64+
<groupId>org.jacoco<groupId>
65+
<artifactId>jacoco-maven-plugin</artifactId>
66+
<version>0.8.8</version>
67+
<configuration>
68+
<destfile>${basedir}/target/jacoco.exec</destfile>
69+
<datafile>${basedir}/target/jacoco.exec</datafile>
70+
<output>file</output>
71+
<append>true<append>
72+
</configuration>
73+
<executions>
74+
<execution>
75+
<id>jacoco-initialize</id>
76+
<goals>
77+
<goal>prepare-agent</goal>
78+
</goals>
79+
<phase>test-compile</phase>
80+
</execution>
81+
<execution>
82+
<id>jacoco-site</id>
83+
<phase>test-compile</phase>
84+
<goals>
85+
<goal>report</goal>
86+
</goals>
87+
</execution>
88+
</executions>
89+
</plugin>
5790
</plugins>
5891
</build>
5992
</project>

0 commit comments

Comments
 (0)