Commit cac6f3f9 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Moved configuration of Maven's code coverage plugin "JaCoCo" from subprojects...

Moved configuration of Maven's code coverage plugin "JaCoCo" from subprojects to top-level "pom.xml".
parent 494fa906
......@@ -58,37 +58,6 @@
<target>${maven-compiler.target.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<!-- Use JaCoCo's Java agents to record coverage data by using on-the-fly class file instrumentation. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<output>file</output>
<destFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Use JaCoCo agent output to create coverage reports in CSV, HTML and XML format. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Maven Surefire is used to execute unit tests. -->
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -115,38 +115,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<!-- Use JaCoCo's Java agents to record coverage data by using on-the-fly class file instrumentation. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<output>file</output>
<destFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Use JaCoCo agent output to create coverage reports in CSV, HTML and XML format. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Maven Surefire is used to cup unit tests. -->
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -46,37 +46,6 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<!-- Use JaCoCo's Java agents to record coverage data by using on-the-fly class file instrumentation. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<output>file</output>
<destFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Use JaCoCo agent output to create coverage reports in CSV, HTML and XML format. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Maven Surefire is used to cup unit tests. -->
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -87,37 +87,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<!-- Use JaCoCo's Java agents to record coverage data by using on-the-fly class file instrumentation. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<output>file</output>
<destFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Use JaCoCo agent output to create coverage reports in CSV, HTML and XML format. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Maven Surefire is used to cup unit tests. -->
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -28,37 +28,6 @@
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<!-- Use JaCoCo's Java agents to record coverage data by using on-the-fly class file instrumentation. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<output>file</output>
<destFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Use JaCoCo agent output to create coverage reports in CSV, HTML and XML format. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Maven Surefire is used to execute unit tests. -->
......
......@@ -44,37 +44,6 @@
<source>1.11</source>
<target>1.11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<!-- Use JaCoCo's Java agents to record coverage data by using on-the-fly class file instrumentation. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<output>file</output>
<destFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!-- Use JaCoCo agent output to create coverage reports in CSV, HTML and XML format. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-data/jacoco-unit-tests.coverage</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Maven Surefire is used to execute unit tests. -->
......
......@@ -70,6 +70,27 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<execution>
<id>pre-unit-test-code-instrumentation</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>${surefireArgLine}</propertyName>
</configuration>
</execution>
<execution>
<id>post-unit-test-report-generation</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/coverage-reports</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment