I have a maven project in the following structure:
1 class under the project and 1 model with a class.
In both of them there are test classes:
-testProject -src -main -java Class2.java -test -java Test2.java -Infra Module -src -main -java Class1.java -test -java Test1.java
in the main pom I configure jacoco plugin:
<plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.5</version> <executions> <execution> <id>prepare-agent</id> <phase>initialize</phase> <goals> <goal>prepare-agent</goal> </goals> <configuration> <includes> <include>*</include> </includes> </configuration> </execution> <execution> <id>report</id> <goals> <goal>report-aggregate</goal> </goals> <phase>verify</phase> </execution> </executions> </plugin>
and also I configure in properties the xmlReportsPath:
mvn clean verify sonar:sonar
I get 0% coverage and error that scoverage.xml file is not found.
The jacoco.xml files are not containing information on tests that were run.
Also, the warning below which I think is not correlated to the problem:
WARNING: An illegal reflective access operation has occurred
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
What is wrong?
Nava Polak Onik.