This is an automated email from the ASF dual-hosted git repository.
tilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 08434639d TIKA-4402: support jacoco
08434639d is described below
commit 08434639d35b36c0cb3c29e2130c21fefb4ecddf
Author: Tilman Hausherr <[email protected]>
AuthorDate: Wed Apr 9 12:42:38 2025 +0200
TIKA-4402: support jacoco
---
tika-parent/pom.xml | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/tika-parent/pom.xml b/tika-parent/pom.xml
index 5a1ac6ee7..2caba8921 100644
--- a/tika-parent/pom.xml
+++ b/tika-parent/pom.xml
@@ -455,6 +455,14 @@
<zstd.version>1.5.7-2</zstd.version>
<nimbus-jose-jwt.version>10.1</nimbus-jose-jwt.version>
<javacpp.version>1.5.11</javacpp.version>
+
+ <!-- needs to exist even if empty due to problems with jacoco-maven-plugin
-->
+ <addmod />
+ <!-- This is a default value to avoid problems when running single tests
+ see also https://stackoverflow.com/a/28695766/535646
+
https://maven.apache.org/surefire/maven-surefire-plugin/faq.html#late-property-evaluation
+ -->
+ <surefireArgLine />
</properties>
<dependencyManagement>
@@ -1141,6 +1149,31 @@
</plugins>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.13</version>
+ <configuration>
+ <skip>${skipTests}</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <propertyName>surefireArgLine</propertyName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -1271,7 +1304,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
- <argLine>-Xmx4g -Djava.awt.headless=true</argLine>
+ <argLine>-Xmx4g -Djava.awt.headless=true @{surefireArgLine}</argLine>
</configuration>
</plugin>
<plugin>