From 787309b10fabfe6fadff843b9c3ce90a6e594f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Sun, 1 Aug 2021 14:59:39 +0200 Subject: [PATCH] Issue #23507 Added jacoco and jacoco-merge profiles - first is used to extend surefire/failsafe plugins and collect information about the test coverage. Results can be imported to Eclipse. - second is used to collect results from all subdirectories and merge them to one file. This can be used to view which code is not invoked by any test in the build. --- nucleus/parent/pom.xml | 65 ++++++++++++++++++++++++++++++++++++++++-- pom.xml | 34 +++++++++++++++++++++- 2 files changed, 96 insertions(+), 3 deletions(-) diff --git a/nucleus/parent/pom.xml b/nucleus/parent/pom.xml index 0302821edf8f..aa503e475ada 100644 --- a/nucleus/parent/pom.xml +++ b/nucleus/parent/pom.xml @@ -155,6 +155,20 @@ 9 1.49 1.0.3 + + -Xss512k -Xms256m -Xmx1g -XX:MaxDirectMemorySize=512m + -verbose:gc -XX:+UseG1GC -XX:+UseStringDeduplication + -Djava.awt.headless=true + -Duser.language=en -Duser.region=US + + + ${maven.test.jvmoptions.memory.sizes} + ${maven.test.jvmoptions.memory.gc} + ${maven.test.jvmoptions.display} + ${maven.test.jvmoptions.locale} + ${maven.test.jvmoptions.custom} + + ${maven.test.jvmoptions} @@ -703,9 +717,9 @@ maven-surefire-plugin - 3.0.0-M4 + 3.0.0-M5 - --add-opens java.base/java.lang=ALL-UNNAMED + ${surefire.argLine} true 1 @@ -1273,6 +1287,53 @@ + + jacoco + + true + ${project.build.directory}/jacoco + 0.8.7 + true + ${maven.test.jvmoptions} @{argLine} + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + org.glassfish.* + + + + + + + + org.jacoco + jacoco-maven-plugin + + + agent-for-unit-tests + + prepare-agent + + + + agent-for-integration-tests + + prepare-agent-integration + + + + + + + + edit-manPages-javaEEVersion diff --git a/pom.xml b/pom.xml index 8f0ae5d6ef31..2d9131bafb03 100644 --- a/pom.xml +++ b/pom.xml @@ -87,6 +87,39 @@ nucleus/tests + + + jacoco-merge + + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + jacoco-merge + verify + false + + merge + + + + + ${basedir} + + **/*.exec + + + + + + + + + +