Hi,
I'm the lead developer of AssertJ Core and I could use a bit of help trying to identify why jacoco is missing the execution data file.
It is likely something misconfigured but I can't put my finger on it.
mvn clean jacoco:prepare-agent package jacoco:report -Dtest=StandardRepresentation_toStringOf_Test
(you can execute all the tests but there are more than 1000 so executing just one is way quicker).
I have verified that I was surefire plugin was configured with forkCount = 1 (so not 0).
The build run jacoco prepare-agent which outputs
[
INFO] argLine set to -javaagent:/home/joel/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/home/joel/prog/assertj/assertj-core-3.x/target/jacoco.exec,excludes=**/*hamcrest*/** --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED
--add-opens
java.base/java.io=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED
I have executed the build in debug and found that surefire argline did not show jacoco destfile setting, I'm not sure if that's a problem ...
argLine = --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED
--add-opens
java.base/java.io=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED
My environment looks like:
Maven home: /home/joel/prog/apache-maven-3.5.3
Java version: 11.0.2, vendor: Oracle Corporation
Java home: /home/joel/.sdkman/candidates/java/11.0.2-open
Default locale: en_NZ, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-169-generic", arch: "amd64", family: "unix"
Any help would be welcome as I'm running out of ideas.
Cheers
Joel Costigliola