Hi John, > evening, > > i'm having trouble testing a multi-release jar project using > toolchains. i want to test it using both java 1.8 and java 11. > > i've the following structure; > src/main/java > src/main/java11 > src/test/java > src/test/java11 > > tried both maven-surefire-plugin v 2.22.2 and 3.0.0-M3 > > if i set java to 1.8 and do mvn clean install, everything works but it > uses java 1.8 for the testing. > > if i set java to 11 and do maven clean install, it fails starting surefire. > > [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: > The forked VM terminated without properly saying goodbye. VM crash or > System.exit called? > [ERROR] Error occurred in starting fork, check output in log > [ERROR] Process Exit Code: 1 > [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork > (ForkStarter.java:669)
I've seen similar errors when executing tests under Java 11. I don't remember the exact reason, but I guess it was one of the following: - features available in Java 8 that were removed in Java 11 - improper module descriptor - for example missing dependencies such as jakarta.xml.bind:jakarta.xml.bind-api in your pom.xml when you're using JAXB in your code HTH Thorsten
