maven build 运行unit test失败 process exit code:134

发布时间 2023-07-19 18:02:30作者: adeline.pan

环境:

JDK :17.0.7

Springboot: 3.1.0

Junit: 5

问题:

运行mvn clean install 时在maven-surefire-plugin: test 阶段失败。The forked VM terminated without prperly saying goodbye. VM crash or System.exit called?

dump file 中的错误:Corrupted channel by directly writing to native stream in forked JVM 1. Stream 'FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed'.

 

解决方法:

升级maven-surefire-plugin(从 2.22 到 3.1.2)

升级jacoco-maven-plugin(从0.8.2 到 0.8.10)

 

参考:

https://stackoverflow.com/questions/55272870/surefire-maven-plugin-corrupted-stdout-by-directly-writing-to-native-stream-in