Skip to content

Commit 4d55e7e

Browse files
committed
Add boilerplate coverage
Clunky since it does not run inside the main lifecycle.
1 parent 2e27936 commit 4d55e7e

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
export MAVEN_OPTS="--add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED"
18+
export MAVEN_OPTS="-javaagent:$HOME/.m2/repository/org/jacoco/org.jacoco.agent/0.8.13/org.jacoco.agent-0.8.13-runtime.jar=destfile=/tmp/jacoco/jacoco-it.exec --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED"
19+
20+
# Run the main build lifecycle + integration tests
1921
mvn clean install failsafe:integration-test invoker:integration-test
22+
23+
# Generate JaCoCo report from integration test coverage data
24+
mvn jacoco:report -Djacoco.dataFile=/tmp/jacoco/jacoco-it.exec

pom.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@
469469
<groupId>org.apache.maven.plugins</groupId>
470470
<artifactId>maven-javadoc-plugin</artifactId>
471471
</plugin>
472+
<plugin>
473+
<groupId>org.jacoco</groupId>
474+
<artifactId>jacoco-maven-plugin</artifactId>
475+
<version>0.8.13</version>
476+
</plugin>
472477
</plugins>
473478
</pluginManagement>
474479
<plugins>
@@ -533,6 +538,18 @@
533538
</execution>
534539
</executions>
535540
</plugin>
541+
<plugin>
542+
<groupId>org.jacoco</groupId>
543+
<artifactId>jacoco-maven-plugin</artifactId>
544+
<executions>
545+
<execution>
546+
<id>default-prepare-agent</id>
547+
<goals>
548+
<goal>prepare-agent</goal>
549+
</goals>
550+
</execution>
551+
</executions>
552+
</plugin>
536553
</plugins>
537554
</build>
538555

0 commit comments

Comments
 (0)