I am getting this error when trying to run mutation coverage
mvn org.pitest:pitest-maven:mutationCoverage or mvn verify -PPIT -X in debug mode.
Error:
Execution pit-report of goal org.pitest:pitest-maven:1.13.0:mutationCoverage failed: Coverage generation minion exited abnormally! (UNKNOWN_ERROR)
Looked at bunch of other similar issues or blogs but nothing seems to fixing this error.
I have a lot of stuff added and taken out in pom.xml in hopes of something working.
I'm going to add snippets of pom related to this question.
pom.xml:
<project>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.version>4.9</junit.version>
<pitest.version>1.4.3</pitest.version>
</properties>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>0.14</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
<version>3.0.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${pitest.version}</version>
<executions>
<execution>
<id>pit-report</id>
<phase>test</phase>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
<!-- https://github.com/hcoles/pitest/issues/284 -->
<!-- Need this to support JUnit 5 -->
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>0.8</version>
</dependency>
</dependencies>
<configuration>
<targetClasses>
<param>com.mkyong.examples.*</param>
</targetClasses>
<targetTests>
<param>com.mkyong.examples.*</param>
</targetTests>
</configuration>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.13.0</version>
<configuration>
<targetClasses>
<param>com.your.package.root.want.to.mutate*</param>
</targetClasses>
<targetTests>
<param>com.your.package.root*</param>
</targetTests>
</configuration>
</plugin>
</plugins>
</build>
</project>

I have made some example setup which uses spring-boot version 3.0.6. It is also neccessary to define the plugins correctly as shown here... furthermore the dependencies you need..
As I mentioned if you really need to use JUnit 4 you have to add the junit jupiter-vintage engine as a dependency ..
https://central.sonatype.com/search?q=pitest-maven
For Spring Boot 3.X you have to use JDK17+...