[ https://issues.apache.org/jira/browse/SUREFIRE-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092263#comment-17092263 ]
Tibor Digana commented on SUREFIRE-1570: ---------------------------------------- Of course, it is null {{Lets see JDKModulePath: null}} because of the code I showed you in the previous comments. Surefire wil work with that because it is not in a collision. The Failsafe is in collision - it has the problem which is the 1% difference. There are code references, you can help us with the fix on GitHub. {noformat} C:\vcs\github\plugin-jpms>mvn clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Com Foo [INFO] Com Foo Api [INFO] Com Foo Plugin [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Com Foo 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ com.foo --- [INFO] Deleting C:\vcs\github\plugin-jpms\target [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-test-source (add-integration-test-sources) @ com.foo --- [INFO] Test Source directory: C:\vcs\github\plugin-jpms\src\it\java added. [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-test-resource (add-integration-test-resources) @ com.foo --- [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:integration-test (integration-tests) @ com.foo --- [INFO] No tests to run. [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:verify (integration-tests) @ com.foo --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ com.foo --- [INFO] Installing C:\vcs\github\plugin-jpms\pom.xml to c:\Users\tibor17\.m2\repository\com\foo\com.foo\1.0.0\com.foo-1.0.0.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Com Foo Api 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ com.foo.api --- [INFO] Deleting C:\vcs\github\plugin-jpms\com.foo.api\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ com.foo.api --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\vcs\github\plugin-jpms\com.foo.api\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.6.2:compile (default-compile) @ com.foo.api --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\vcs\github\plugin-jpms\com.foo.api\target\classes [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-test-source (add-integration-test-sources) @ com.foo.api --- [INFO] Test Source directory: C:\vcs\github\plugin-jpms\com.foo.api\src\it\java added. [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-test-resource (add-integration-test-resources) @ com.foo.api --- [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ com.foo.api --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\vcs\github\plugin-jpms\com.foo.api\src\test\resources [INFO] skip non existing resourceDirectory C:\vcs\github\plugin-jpms\com.foo.api\src\it\resources [INFO] [INFO] --- maven-compiler-plugin:3.6.2:testCompile (default-testCompile) @ com.foo.api --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:3.0.0-SNAPSHOT:test (default-test) @ com.foo.api --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ com.foo.api --- [INFO] Building jar: C:\vcs\github\plugin-jpms\com.foo.api\target\com.foo.api-1.0.0.jar [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:integration-test (integration-tests) @ com.foo.api --- [INFO] No tests to run. [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:verify (integration-tests) @ com.foo.api --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ com.foo.api --- [INFO] Installing C:\vcs\github\plugin-jpms\com.foo.api\target\com.foo.api-1.0.0.jar to c:\Users\tibor17\.m2\repository\com\foo\com.foo.api\1.0.0\com.foo.api-1.0.0.jar [INFO] Installing C:\vcs\github\plugin-jpms\com.foo.api\pom.xml to c:\Users\tibor17\.m2\repository\com\foo\com.foo.api\1.0.0\com.foo.api-1.0.0.pom [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Com Foo Plugin 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ com.foo.plugin --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ com.foo.plugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\vcs\github\plugin-jpms\com.foo.plugin\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ com.foo.plugin --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\vcs\github\plugin-jpms\com.foo.plugin\target\classes [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-test-source (add-integration-test-sources) @ com.foo.plugin --- [INFO] Test Source directory: C:\vcs\github\plugin-jpms\com.foo.plugin\src\it\java added. [INFO] [INFO] --- build-helper-maven-plugin:1.9.1:add-test-resource (add-integration-test-resources) @ com.foo.plugin --- [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ com.foo.plugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\vcs\github\plugin-jpms\com.foo.plugin\src\test\resources [INFO] skip non existing resourceDirectory C:\vcs\github\plugin-jpms\com.foo.plugin\src\it\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ com.foo.plugin --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to C:\vcs\github\plugin-jpms\com.foo.plugin\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:3.0.0-SNAPSHOT:test (default-test) @ com.foo.plugin --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.foo.plugin.BarTest [main] INFO com.foo.plugin.BarTest - ======UNIT TEST======= [main] INFO com.foo.plugin.BarTest - Lets see JDKModulePath: C:\vcs\github\plugin-jpms\com.foo.plugin\target\classes;c:\Users\tibor17\.m2\repository\org\slf4j\slf4j-simple\1.8.0-beta2\slf4j-simple-1.8.0-beta2.jar;C:\vcs\github\plugin-jpms\com.foo.api\target\com.foo.api-1.0.0.jar;c:\Users\tibor17\.m2\repository\jakarta\ws\rs\jakarta.ws.rs-api\2.1.6\jakarta.ws.rs-api-2.1.6.jar;c:\Users\tibor17\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.2\jakarta.xml.bind-api-2.3.2.jar;c:\Users\tibor17\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.1\jakarta.activation-api-1.2.1.jar;c:\Users\tibor17\.m2\repository\org\slf4j\slf4j-api\1.8.0-beta2\slf4j-api-1.8.0-beta2.jar [main] INFO com.foo.plugin.BarTest - [main] INFO com.foo.plugin.BarTest - Let's see if I or SLF4J are among boot layer modules: true [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.121 s - in com.foo.plugin.BarTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ com.foo.plugin --- [INFO] Building jar: C:\vcs\github\plugin-jpms\com.foo.plugin\target\com.foo.plugin-1.0.0.jar [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:integration-test (integration-tests) @ com.foo.plugin --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.foo.plugin.BarIT [main] INFO com.foo.plugin.BarIT - ======INTEGRATION TEST======= [main] INFO com.foo.plugin.BarIT - Lets see JDKModulePath: null [main] INFO com.foo.plugin.BarIT - [main] INFO com.foo.plugin.BarIT - Let's see if I or SLF4J are among boot layer modules: false [main] INFO com.foo.plugin.BarIT - Maybe we are in child layer? Or this is not module path? [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.09 s - in com.foo.plugin.BarIT [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:verify (integration-tests) @ com.foo.plugin --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ com.foo.plugin --- [INFO] Installing C:\vcs\github\plugin-jpms\com.foo.plugin\target\com.foo.plugin-1.0.0.jar to c:\Users\tibor17\.m2\repository\com\foo\com.foo.plugin\1.0.0\com.foo.plugin-1.0.0.jar [INFO] Installing C:\vcs\github\plugin-jpms\com.foo.plugin\pom.xml to c:\Users\tibor17\.m2\repository\com\foo\com.foo.plugin\1.0.0\com.foo.plugin-1.0.0.pom [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Com Foo ............................................ SUCCESS [ 2.907 s] [INFO] Com Foo Api ........................................ SUCCESS [ 5.080 s] [INFO] Com Foo Plugin ..................................... SUCCESS [ 8.909 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.114 s [INFO] Finished at: 2020-04-25T16:52:04+02:00 [INFO] Final Memory: 18M/64M [INFO] ------------------------------------------------------------------------ {noformat} > Maven-fail-safe doesn't put testing JPMS module on module path > -------------------------------------------------------------- > > Key: SUREFIRE-1570 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1570 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Failsafe Plugin > Affects Versions: 2.22.0 > Reporter: Pavel_K > Priority: Major > Fix For: 3.0.0-M5 > > Attachments: mavenproject20.zip > > > I uploaded project - mavenproject20. Run `mvn verify`. You will see the > following: > {code:java} > [INFO] Scanning for projects... > [INFO] > > [INFO] > ------------------------------------------------------------------------ > [INFO] Building mavenproject20 0.1.0-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ > mavenproject20 --- > [INFO] Using 'UTF-8' encoding to copy filtered resources. > [INFO] Copying 0 resource > [INFO] > [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ > mavenproject20 --- > [WARNING] > ******************************************************************************************************************** > [WARNING] * Required filename-based automodules detected. Please don't > publish this project to a public artifact repository! * > [WARNING] > ******************************************************************************************************************** > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 3 source files to > /home/Jim/NetBeansProjects/mavenproject20/target/classes > [WARNING] > /home/Jim/NetBeansProjects/mavenproject20/src/main/java/module-info.java:[1,8] > module name component Mavenproject20 should avoid terminal digits > [INFO] > [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ > mavenproject20 --- > [INFO] Using 'UTF-8' encoding to copy filtered resources. > [INFO] skip non existing resourceDirectory > /home/Jim/NetBeansProjects/mavenproject20/src/test/resources > [INFO] > [INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ > mavenproject20 --- > [INFO] Changes detected - recompiling the module! > [INFO] Compiling 1 source file to > /home/Jim/NetBeansProjects/mavenproject20/target/test-classes > [INFO] > [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ mavenproject20 > --- > [INFO] > [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ mavenproject20 --- > [INFO] Building jar: > /home/Jim/NetBeansProjects/mavenproject20/target/mavenproject20-0.1.0-SNAPSHOT.jar > [INFO] > [INFO] --- maven-failsafe-plugin:2.22.0:integration-test (integration-tests) > @ mavenproject20 --- > [INFO] > [INFO] ------------------------------------------------------- > [INFO] T E S T S > [INFO] ------------------------------------------------------- > [INFO] Running me.pavel.mavenproject20.ServiceIT > JDKModulePath:null > ModuleName:null > module jdk.unsupported > module jdk.sctp > module java.naming > module java.jnlp > module jdk.httpserver > module java.xml > module javafx.controls > module java.datatransfer > module jdk.javadoc > module jdk.jconsole > module java.instrument > module jdk.packager > module jdk.deploy > module jdk.jfr > module jdk.management > module jdk.charsets > module oracle.net > module jdk.jdeps > module java.sql.rowset > module jdk.net > module jdk.accessibility > module jdk.attach > module jdk.internal.le > module jdk.snmp > module java.base > module jdk.plugin > module jdk.dynalink > module jdk.naming.rmi > module jdk.internal.opt > module java.management.rmi > module jdk.management.jfr > module javafx.swing > module jdk.editpad > module jdk.crypto.ec > module jdk.javaws > module jdk.jstatd > module jdk.management.agent > module javafx.graphics > module javafx.media > module java.rmi > module java.prefs > module jdk.security.jgss > module javafx.fxml > module java.smartcardio > module jdk.xml.dom > module java.xml.crypto > module jdk.jsobject > module jdk.jdi > module jdk.compiler > module java.management > module jdk.management.cmm > module jdk.packager.services > module jdk.jartool > module jdk.scripting.nashorn > module java.security.jgss > module jdk.localedata > module java.desktop > module jdk.zipfs > module jdk.jshell > module oracle.desktop > module jdk.internal.ed > module java.security.sasl > module jdk.jdwp.agent > module java.compiler > module jdk.plugin.dom > module javafx.web > module jdk.naming.dns > module jdk.crypto.cryptoki > module jdk.management.resource > module javafx.base > module java.sql > module jdk.security.auth > module java.se > module jdk.internal.jvmstat > module jdk.jlink > module java.logging > module java.scripting > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.049 > s <<< FAILURE! - in me.pavel.mavenproject20.ServiceIT > [ERROR] testGetString Time elapsed: 0.037 s <<< ERROR! > java.util.NoSuchElementException: No value present > at me.pavel.mavenproject20.ServiceIT.testGetString(ServiceIT.java:16) > [INFO] > [INFO] Results: > [INFO] > [ERROR] Errors: > [ERROR] ServiceIT.testGetString:16 ยป NoSuchElement No value present > [INFO] > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 > [INFO] > [INFO] > [INFO] --- maven-failsafe-plugin:2.22.0:verify (integration-tests) @ > mavenproject20 --- > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 5.148 s > [INFO] Finished at: 2018-09-15T19:20:44+03:00 > [INFO] Final Memory: 16M/54M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-failsafe-plugin:2.22.0:verify > (integration-tests) on project mavenproject20: There are test failures. > [ERROR] > [ERROR] Please refer to > /home/Jim/NetBeansProjects/mavenproject20/target/failsafe-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] -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException > {code} > As you see it shows that `JDKModulePath:null and ModuleName:null`. At the > same time there is no Mavenproject20 in boot layer, although all other > modules are present (I don't think that the plugin creates another layer). > Because of this it is impossible to test JPMS services. -- This message was sent by Atlassian Jira (v8.3.4#803005)