kaitoy / pcap4j

A Java library for capturing, crafting, and sending packets.

Home Page:https://www.pcap4j.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to build due to surefire issue

leomaatEric opened this issue · comments

Hi,

The "how to build" section seems not work for me, I tried it on both Linux and Windows following the instructions strictly, and also tried with jdk9.0.4, jdk10.0.2, jdk11.0.1, all were failed by this error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project pcap4j-core: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/eiknoqt/git/pcap4j/pcap4j-core/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /home/eiknoqt/git/pcap4j/pcap4j-core && /app/vbuild/SLED11-x86_64/jdk/10.0.2/bin/java -Dfile.encoding=UTF-8 @/home/eiknoqt/git/pcap4j/pcap4j-core/target/surefire/surefireargs4343169248189586738 /home/eiknoqt/git/pcap4j/pcap4j-core/target/surefire 2020-06-10T17-47-53_070-jvmRun1 surefire8077278636241359229tmp surefire_02906804625988577676tmp

and the dump file says:

# Created at 2020-06-10T17:48:55.396
Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 'Error occurred during initialization of boot layer'.
java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma after third character in command 'Error occurred during initialization of boot layer'.
	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:748)

I googled the similar issue on surefire SUREFIRE-1496 , but it's not got solved.

Now I'm blocked on building an own release of pcap4j with latest code update, can someone help me out?