运行mvn org.pitest:pitest-maven:mutationCoverage
时,出现以下错误(Environment: Windows 10, Maven 3.6.1, Java 11, junit-jupiter 5.4.1, pitest 1.4.7
)
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.4.7:mutationCoverage (default-cli) on project hello-strange-world: Execution default-cli of goal org.pitest:pitest-maven:1.4.7:mutationCoverage failed: Coverage generation minion exited abnormally. Please check the classpath.
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : Java HotSpot(TM) 64-Bit Server VM
[ERROR] Vendor : Oracle Corporation
[ERROR] Version : 11.0.2+9-LTS
[ERROR] Uptime : 4936
[ERROR] Input ->
[ERROR] 1 : -Dclassworlds.conf=C:\DEVRES\apache-maven-3.6.1\bin\..\bin\m2.conf
[ERROR] 2 : -Dmaven.home=C:\DEVRES\apache-maven-3.6.1\bin\..
[ERROR] 3 : -Dlibrary.jansi.path=C:\DEVRES\apache-maven-3.6.1\bin\..\lib\jansi-native
[ERROR] 4 : -Dmaven.multiModuleProjectDirectory=D:\DATA02\DEVELOPMENT\hellostrangeworld
[ERROR] BootClassPathSupported : false
[ERROR]
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : Java HotSpot(TM) 64-Bit Server VM
[ERROR] Vendor : Oracle Corporation
[ERROR] Version : 11.0.2+9-LTS
[ERROR] Uptime : 4936
[ERROR] Input ->
[ERROR] 1 : -Dclassworlds.conf=C:\DEVRES\apache-maven-3.6.1\bin\..\bin\m2.conf
[ERROR] 2 : -Dmaven.home=C:\DEVRES\apache-maven-3.6.1\bin\..
[ERROR] 3 : -Dlibrary.jansi.path=C:\DEVRES\apache-maven-3.6.1\bin\..\lib\jansi-native
[ERROR] 4 : -Dmaven.multiModuleProjectDirectory=D:\DATA02\DEVELOPMENT\hellostrangeworld
[ERROR] BootClassPathSupported : false
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
参考:https://github.com/ooroor/hellostrangeworld/blob/make_pitest_work/pom.xml
最佳答案
JUnit似乎缺少依赖项,因此请尝试将以下内容添加到pom.xml
:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>