[jira] [Updated] (SUREFIRE-1733) Surefire and Failsafe JPMS additions for JUnit 5.x execution
[ https://issues.apache.org/jira/browse/SUREFIRE-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tibor Digana updated SUREFIRE-1733: --- Fix Version/s: 3.0.0-M5 > Surefire and Failsafe JPMS additions for JUnit 5.x execution > > > Key: SUREFIRE-1733 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1733 > Project: Maven Surefire > Issue Type: Improvement > Components: Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.22.2, 3.0.0-M4 >Reporter: John Patrick >Priority: Minor > Fix For: 3.0.0-M5 > > Attachments: surefire-v2.22.2_junit-v5.5.2.txt, > surefire-v2.22.2_junit-v5.6.0-M1.txt, surefire-v3.0.0-M4_junit-v5.5.2.txt, > surefire-v3.0.0-M4_junit-v5.6.0-M1.txt > > > Following on from SUREFIRE-1731 it was highlighted that some projects need > extra '--add-open' options for JUnit to execute correctly, lots have already > been handled or added or supported in previous releases but I'm needing to > add these for a project to run correctly. > I'm happy to start looking at a patch, but need help with where repo or class > to start looking at. > This is what extra arguments I'm needing to pass to surefire/failsafe. > {code} > --add-opens > ${project.Automatic-Module-Name}/${project.Automatic-Module-Name}=ALL-UNNAMED > --add-opens > ${project.Automatic-Module-Name}/${project.Automatic-Module-Name}=org.junit.platform.commons > --add-opens > org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED > --add-opens > org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED > {code} > Luckly my module names and package names are all on the same standard and > I've got a maven property for each sub module defining what > 'project.Automatic-Module-Name' is. > The 2nd two are probably easy and will work for everyone, the 1st two might > require some discussion and maybe define two variables that surefire and > failsafe can use, one for the module name and one for the package name if > they can dynamically scan the source code and work it out. > This is the stacktrace I'm seeing; > {code} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on > project PROJECT: There are test failures. > [ERROR] > [ERROR] Please refer to PATH/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] There was an error in the forked process > [ERROR] java.lang.IllegalAccessError: class > org.junit.platform.launcher.core.LauncherFactory (in unnamed module > @0x6eceb130) cannot access class > org.junit.platform.commons.util.Preconditions (in module > org.junit.platform.commons) because module org.junit.platform.commons does > not export org.junit.platform.commons.util to unnamed module @0x6eceb130 > [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There > was an error in the forked process > [ERROR] java.lang.IllegalAccessError: class > org.junit.platform.launcher.core.LauncherFactory (in unnamed module > @0x6eceb130) cannot access class > org.junit.platform.commons.util.Preconditions (in module > org.junit.platform.commons) because module org.junit.platform.commons does > not export org.junit.platform.commons.util to unnamed module @0x6eceb130 > [ERROR] at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:656) > [ERROR] at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282) > [ERROR] at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) > [ERROR] at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) > [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 >
[jira] [Updated] (SUREFIRE-1733) Surefire and Failsafe JPMS additions for JUnit 5.x execution
[ https://issues.apache.org/jira/browse/SUREFIRE-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Patrick updated SUREFIRE-1733: --- Attachment: surefire-v3.0.0-M4_junit-v5.6.0-M1.txt surefire-v3.0.0-M4_junit-v5.5.2.txt surefire-v2.22.2_junit-v5.6.0-M1.txt surefire-v2.22.2_junit-v5.5.2.txt > Surefire and Failsafe JPMS additions for JUnit 5.x execution > > > Key: SUREFIRE-1733 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1733 > Project: Maven Surefire > Issue Type: Improvement > Components: Maven Failsafe Plugin, Maven Surefire Plugin >Affects Versions: 2.22.2, 3.0.0-M4 >Reporter: John Patrick >Priority: Minor > Attachments: surefire-v2.22.2_junit-v5.5.2.txt, > surefire-v2.22.2_junit-v5.6.0-M1.txt, surefire-v3.0.0-M4_junit-v5.5.2.txt, > surefire-v3.0.0-M4_junit-v5.6.0-M1.txt > > > Following on from SUREFIRE-1731 it was highlighted that some projects need > extra '--add-open' options for JUnit to execute correctly, lots have already > been handled or added or supported in previous releases but I'm needing to > add these for a project to run correctly. > I'm happy to start looking at a patch, but need help with where repo or class > to start looking at. > This is what extra arguments I'm needing to pass to surefire/failsafe. > {code} > --add-opens > ${project.Automatic-Module-Name}/${project.Automatic-Module-Name}=ALL-UNNAMED > --add-opens > ${project.Automatic-Module-Name}/${project.Automatic-Module-Name}=org.junit.platform.commons > --add-opens > org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED > --add-opens > org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED > {code} > Luckly my module names and package names are all on the same standard and > I've got a maven property for each sub module defining what > 'project.Automatic-Module-Name' is. > The 2nd two are probably easy and will work for everyone, the 1st two might > require some discussion and maybe define two variables that surefire and > failsafe can use, one for the module name and one for the package name if > they can dynamically scan the source code and work it out. > This is the stacktrace I'm seeing; > {code} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on > project PROJECT: There are test failures. > [ERROR] > [ERROR] Please refer to PATH/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] There was an error in the forked process > [ERROR] java.lang.IllegalAccessError: class > org.junit.platform.launcher.core.LauncherFactory (in unnamed module > @0x6eceb130) cannot access class > org.junit.platform.commons.util.Preconditions (in module > org.junit.platform.commons) because module org.junit.platform.commons does > not export org.junit.platform.commons.util to unnamed module @0x6eceb130 > [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There > was an error in the forked process > [ERROR] java.lang.IllegalAccessError: class > org.junit.platform.launcher.core.LauncherFactory (in unnamed module > @0x6eceb130) cannot access class > org.junit.platform.commons.util.Preconditions (in module > org.junit.platform.commons) because module org.junit.platform.commons does > not export org.junit.platform.commons.util to unnamed module @0x6eceb130 > [ERROR] at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:656) > [ERROR] at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282) > [ERROR] at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) > [ERROR] at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) > [ERROR] at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) > [ERROR] at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) > [ERROR] at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) > [ERROR]