在Java jar上运行Junit 5测试并加载依赖项时,会出现警告
Corrupted STDOUT by directly writing to native stream in forked JVM 1. See FAQ web page and the dump file O:\VSTS\_work\2\s\target\surefire-reports\2019-11-04T13-14-53_351-jvmRun1.dumpstream当我去查看dumpstream时,它充满了这样的评论:
Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream '13:14:57.199 6960-Log dbug system Thread::GoThread Thread 6960-Log started.'.
java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma after third character in command '13:14:57.199 6960-Log dbug system Thread::GoThread Thread 6960-Log started.'.
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.<init>(ForkClient.java:507)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:210)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:177)
at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:88)
at java.lang.Thread.run(Thread.java:745)surefire booterclient出了什么问题?
要设置的每个Maven surefire could not find ForkedBooter class
<useSystemClassLoader>false</useSystemClassLoader>解决了依赖加载问题,但没有解决损坏的流。
发布于 2019-11-04 23:12:04
通过将forkCount设置为0解决了该错误
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<forkCount>0</forkCount>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
<systemPropertyVariables>
<useSystemClassLoader>false</useSystemClassLoader>
<concordion.output.dir>target/concordion</concordion.output.dir>
</systemPropertyVariables>
</configuration>
</plugin>https://stackoverflow.com/questions/58695823
复制相似问题