Skip to content

Instantly share code, notes, and snippets.

@MichalAdorno
Forked from Rocketeer007/pom.xml
Created November 9, 2018 10:04
Show Gist options
  • Save MichalAdorno/fe924d43ce6f5c20b9cc5d91c5b1a45b to your computer and use it in GitHub Desktop.
Save MichalAdorno/fe924d43ce6f5c20b9cc5d91c5b1a45b to your computer and use it in GitHub Desktop.
Surefire, Failsafe and Jacoco configuration for build
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
</plugin>
</plugins>
</pluginManagement>
</build>
...
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment