Add jacoco plugin

This commit is contained in:
Oystein Kristoffer Tveit 2021-09-06 00:54:55 +02:00
parent 3747f35894
commit ed38fd3583
1 changed files with 25 additions and 0 deletions

View File

@ -77,6 +77,7 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -85,6 +86,7 @@
<release>16</release> <release>16</release>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
@ -101,6 +103,29 @@
<mainClass>oysteikt.calc.CalcApp</mainClass> <mainClass>oysteikt.calc.CalcApp</mainClass>
</configuration> </configuration>
</plugin> </plugin>
<!-- Plugin to generate code coverage reports -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>