Add Jacoco support in Maven configuration

This commit is contained in:
Antonin Delpeuch 2018-09-16 12:53:54 +01:00
parent 782ae4e788
commit e98dbc537d

30
pom.xml
View File

@ -89,11 +89,41 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<argLine>${surefireArgs}</argLine>
<suiteXmlFiles>
<suiteXmlFile>main/tests/server/conf/tests.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<phase>process-test-resources</phase>
<configuration>
<destFile>${project.build.directory}/report/jacoco.xml</destFile>
<propertyName>surefireArgs</propertyName>
</configuration>
</execution>
<execution>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/report/jacoco.xml</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>