junit5-jupiter-starter-maven out of date?
jactor-rises opened this issue · 10 comments
I am fixing a project with junit jupiter 5.2.0, but I cannot build it. The build had a more tedious configuration earlier and after issues with compiled build, I am trying to resolve this...
However: Compiling the code works fine, but tests are not even executed as the surefire-plugin throws an exception with no details in the message. There are no warnings/errors prior to this message.
The exceptuion:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project jactor-commons: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test failed.: IllegalArgumentException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project jactor-commons: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.codehaus.plexus.languages.java.jpms.AsmModuleInfoParser.parse(AsmModuleInfoParser.java:89)
at org.codehaus.plexus.languages.java.jpms.AsmModuleInfoParser.getModuleDescriptor(AsmModuleInfoParser.java:54)
at org.codehaus.plexus.languages.java.jpms.LocationManager.resolvePaths(LocationManager.java:83)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.newStartupConfigForModularClasspath(AbstractSurefireMojo.java:1765)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createStartupConfiguration(AbstractSurefireMojo.java:1708)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createForkStarter(AbstractSurefireMojo.java:2043)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1146)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:978)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:854)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
The GitHub branch with the code: https://github.com/jactor-rises/jactor-rises/tree/feature/5_configuration
The issue trying to be resolved:jactor-rises/jactor-rises#5
Even though junit.jupiter is written for java 1.8, I do not think that my code is "revolutionary" so it cannot be executed despite of it being java 10. What might be the problem.
Yes... I have already tried this. It also fails... Maybe with a "better" exception:
from mvn clean install -e -X
:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[DEBUG] Determined Maven Process ID 1109
[DEBUG] boot classpath: /Users/jactor/.m2/repository/org/apache/maven/surefire/surefire-booter/2.22.0/surefire-booter-2.22.0.jar /Users/jactor/.m2/repository/org/apache/maven/surefire/surefire-api/2.22.0/surefire-api-2.22.0.jar /Users/jactor/.m2/repository/org/apache/maven/surefire/surefire-logger-api/2.22.0/surefire-logger-api-2.22.0.jar /Users/jactor/ws/jactor-rises/jactor-commons/target/test-classes /Users/jactor/.m2/repository/org/assertj/assertj-core/3.10.0/assertj-core-3.10.0.jar /Users/jactor/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.2.0/junit-jupiter-api-5.2.0.jar /Users/jactor/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar /Users/jactor/.m2/repository/org/opentest4j/opentest4j/1.1.0/opentest4j-1.1.0.jar /Users/jactor/.m2/repository/org/junit/platform/junit-platform-commons/1.2.0/junit-platform-commons-1.2.0.jar /Users/jactor/.m2/repository/org/mockito/mockito-core/2.19.0/mockito-core-2.19.0.jar /Users/jactor/.m2/repository/net/bytebuddy/byte-buddy/1.7.11/byte-buddy-1.7.11.jar /Users/jactor/.m2/repository/net/bytebuddy/byte-buddy-agent/1.7.11/byte-buddy-agent-1.7.11.jar /Users/jactor/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar /Users/jactor/.m2/repository/org/junit/platform/junit-platform-surefire-provider/1.2.0/junit-platform-surefire-provider-1.2.0.jar /Users/jactor/.m2/repository/org/junit/platform/junit-platform-launcher/1.2.0/junit-platform-launcher-1.2.0.jar /Users/jactor/.m2/repository/org/junit/platform/junit-platform-engine/1.2.0/junit-platform-engine-1.2.0.jar /Users/jactor/.m2/repository/org/apache/maven/surefire/common-java5/2.21.0/common-java5-2.21.0.jar /Users/jactor/.m2/repository/junit/junit/4.12/junit-4.12.jar /Users/jactor/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar /Users/jactor/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[DEBUG] boot(compact) classpath: surefire-booter-2.22.0.jar surefire-api-2.22.0.jar surefire-logger-api-2.22.0.jar test-classes assertj-core-3.10.0.jar junit-jupiter-api-5.2.0.jar apiguardian-api-1.0.0.jar opentest4j-1.1.0.jar junit-platform-commons-1.2.0.jar mockito-core-2.19.0.jar byte-buddy-1.7.11.jar byte-buddy-agent-1.7.11.jar objenesis-2.6.jar junit-platform-surefire-provider-1.2.0.jar junit-platform-launcher-1.2.0.jar junit-platform-engine-1.2.0.jar common-java5-2.21.0.jar junit-4.12.jar hamcrest-core-1.3.jar maven-reporting-api-3.0.jar
[DEBUG] Forking command line: /bin/sh -c cd /Users/jactor/ws/jactor-rises/jactor-commons && /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/java @/Users/jactor/ws/jactor-rises/jactor-commons/target/surefire/surefireargs17982990077422840856 /Users/jactor/ws/jactor-rises/jactor-commons/target/surefire 2018-08-19T17-14-04_174-jvmRun1 surefire5495645978951937352tmp surefire_04552148515258709172tmp
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] jactor-rises ....................................... SUCCESS [ 1.176 s]
[INFO] jactor-rises::jactor-commons ....................... FAILURE [ 7.834 s]
[INFO] jactor-rises::jactor-test .......................... SKIPPED
[INFO] jactor-rises::jactor-model ......................... SKIPPED
[INFO] jactor-rises::jactor-applications::jactor-persistence-orm SKIPPED
[INFO] jactor-rises::jactor-applications::jactor-facade ... SKIPPED
[INFO] jactor-rises::jactor-applications::jactor-web ...... SKIPPED
[INFO] jactor-rises::jactor-applications .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.038 s
[INFO] Finished at: 2018-08-19T17:14:05+02:00
[INFO] Final Memory: 31M/134M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project jactor-commons: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/jactor/ws/jactor-rises/jactor-commons/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project jactor-commons: There are test failures.
Please refer to /Users/jactor/ws/jactor-rises/jactor-commons/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
There was an error in the forked process
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: There are test failures.
Please refer to /Users/jactor/ws/jactor-rises/jactor-commons/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
There was an error in the forked process
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.apache.maven.plugin.surefire.SurefireHelper.throwException(SurefireHelper.java:235)
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:112)
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:364)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1052)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
... 23 more
[ERROR] org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
You need the junit-jupiter-engine
at test runtime. Check the documentation of Surefire 2.22.0 how to do this: http://lmgtfy.com/?q=maven+surefire+junit5
Or read the dependencies listed in the junit5-jupiter-starter-maven
, updated on 29 Jun:
junit5-samples/junit5-jupiter-starter-maven/pom.xml
Lines 19 to 38 in ccb4c18
Hmmm...
I have updated the configuration according to your sample link. But it still fails 👎
Now all surefire tests tell me to open the module... What am I missing?:
-------------------------------------------------------------------------------
Test set: com.github.jactor.rises.commons.datatype.EmailAddressTest
-------------------------------------------------------------------------------
Tests run: 9, Failures: 0, Errors: 9, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! - in com.github.jactor.rises.commons.datatype.EmailAddressTest
willNotInitializeWithoutAtSignInConstructor Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
whenChecksForEqualityTheImplementationShouldBeCorrect Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
whenInvokingHashCodeTheImplementationShouldBeCorrect Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
willNotInitializeWhenSuffixIsNull Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
willInitializeWithFullEmailAddress Time elapsed: 0.001 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
willNotInitializeWhenPrefixIsNull Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
whenInvokingToStringOnTheDataTypeItShouldBeImplementedOnTheDataTypeClass Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
shouldCheckIfEqualToUserName Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
willNotInitializeWhenFullEmailAddressIsNull Time elapsed: 0 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make com.github.jactor.rises.commons.datatype.EmailAddressTest() accessible: module jactor.rises.commons does not "opens com.github.jactor.rises.commons.datatype" to unnamed module @3fc2959f
I would also point out that the starter example linked from the user guide is 4 months old:
https://github.com/junit-team/junit5-samples/tree/r5.2.0/junit5-jupiter-starter-maven
My failing configuration branch:
https://github.com/jactor-rises/jactor-rises/tree/feature/5_configuration
Now all surefire tests tell me to open the module...
Welcome to "Testing In The Modular World". This gonna be fun! New stuff, even less tools are ready. ;-)
Here are some straws:
- https://github.com/junit-team/junit5-samples/tree/master/junit5-modular-world
- junit-team/junit5#1552 (comment)
I would also point out that the starter example linked from the user guide is 4 months old:
True. Locked down to r5.2.0
to keep the context in sync.
My failing configuration branch:
Boil it down to a single modular "sandbox" project first. Even that will be hard to compile and test.
I still want to point out that the documentation is out of date. I am using 5.2.0 and the starter example is not working...
I am looking forward to a deep dive into the links you offered 👍
I am using 5.2.0 and the starter example is not working...
Works like expected on Java 8, using the class-path: https://travis-ci.org/junit-team/junit5-samples/jobs/418258354#L1007
All starter projects are ment to get you started.
Testing modular projects is just about ... to get started. If Maven Surefire does not work as expected, please open a ticket here: https://issues.apache.org/jira/browse/SUREFIRE
hmmm... I thought that a modular build should be ... modular. created an issue at maven surefire: https://issues.apache.org/jira/browse/SUREFIRE-1557
Thanks.
Let's discuss the issue and how to solve it over there.