[ 
https://issues.apache.org/jira/browse/SUREFIRE-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17111235#comment-17111235
 ] 

Pavel_K commented on SUREFIRE-1570:
-----------------------------------

[~tibordigana] I don't have any problems:


{code:java}
pavel@pc1:~/Temp$ java -version
openjdk version "14" 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)

pavel@pc1:~/Temp$ git clone https://github.com/apache/maven-surefire.git
Cloning into 'maven-surefire'...
remote: Enumerating objects: 808, done.
remote: Counting objects: 100% (808/808), done.
remote: Compressing objects: 100% (441/441), done.
remote: Total 70097 (delta 194), reused 602 (delta 115), pack-reused 69289
Receiving objects: 100% (70097/70097), 12.55 MiB | 2.36 MiB/s, done.
Resolving deltas: 100% (23491/23491), done.

pavel@pc1:~/Temp$ cd maven-surefire
pavel@pc1:~/Temp/maven-surefire$ 

pavel@pc1:~/Temp/maven-surefire$ mvn install -DskipTests -nsu

....
[INFO] Reactor Summary for Apache Maven Surefire 3.0.0-SNAPSHOT:
[INFO] 
[INFO] Apache Maven Surefire .............................. SUCCESS [  9.445 s]
[INFO] SureFire Logger API ................................ SUCCESS [  4.226 s]
[INFO] SureFire API ....................................... SUCCESS [  5.182 s]
[INFO] Surefire Extensions API ............................ SUCCESS [  2.361 s]
[INFO] Surefire Extensions SPI ............................ SUCCESS [  1.110 s]
[INFO] SureFire Booter .................................... SUCCESS [  5.290 s]
[INFO] Maven Surefire Test-Grouping Support ............... SUCCESS [  2.872 s]
[INFO] SureFire Providers ................................. SUCCESS [  0.451 s]
[INFO] Shared JUnit3 Provider Code ........................ SUCCESS [  1.925 s]
[INFO] Shared Java 5 Provider Base ........................ SUCCESS [  2.399 s]
[INFO] Shared JUnit4 Provider Code ........................ SUCCESS [  2.473 s]
[INFO] Shared JUnit48 Provider Code ....................... SUCCESS [  2.877 s]
[INFO] SureFire JUnit Runner .............................. SUCCESS [  2.162 s]
[INFO] SureFire JUnit4 Runner ............................. SUCCESS [  2.071 s]
[INFO] Maven Surefire Common .............................. SUCCESS [  9.952 s]
[INFO] SureFire JUnitCore Runner .......................... SUCCESS [  5.007 s]
[INFO] SureFire JUnit Platform Runner ..................... SUCCESS [  4.309 s]
[INFO] SureFire TestNG Utils .............................. SUCCESS [  2.166 s]
[INFO] SureFire TestNG Runner ............................. SUCCESS [  2.967 s]
[INFO] ShadeFire JUnit3 Provider .......................... SUCCESS [  1.249 s]
[INFO] Surefire Report Parser ............................. SUCCESS [  2.975 s]
[INFO] Maven Surefire Plugin .............................. SUCCESS [  5.779 s]
[INFO] Maven Failsafe Plugin .............................. SUCCESS [  4.652 s]
[INFO] Maven Surefire Report Plugin ....................... SUCCESS [  6.318 s]
[INFO] Maven Surefire Integration Tests ................... SUCCESS [  5.776 s]
[INFO] Surefire Shared Utils .............................. SUCCESS [  0.946 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:37 min
[INFO] Finished at: 2020-05-19T17:29:34+03:00

pavel@pc1:~/Temp/maven-surefire$ cd 
surefire-its/src/test/resources/surefire-1570
pavel@pc1:~/Temp/maven-surefire/surefire-its/src/test/resources/surefire-1570$

pavel@pc1:~/Temp/maven-surefire/surefire-its/src/test/resources/surefire-1570$ 
mvn verify -nsu -Dsurefire.version=3.0.0-SNAPSHOT
...
[INFO] --- maven-surefire-plugin:3.0.0-SNAPSHOT:test (default-test) @ 
com.foo.impl ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.foo.impl.BarTest
[main] INFO com.foo.impl.BarTest - ======UNIT TEST=======
...
[main] INFO com.foo.impl.Bar - 
[main] INFO com.foo.impl.Bar - 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.084 s 
- in com.foo.impl.BarTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ com.foo.impl ---
[INFO] Building jar: 
/home/pavel/Temp/maven-surefire/surefire-its/src/test/resources/surefire-1570/com.foo.impl/target/com.foo.impl-1.0.0.jar
[INFO] 
[INFO] --- maven-failsafe-plugin:3.0.0-SNAPSHOT:integration-test 
(integration-tests) @ com.foo.impl ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.foo.impl.BarIT
[main] INFO com.foo.impl.BarIT - ======INTEGRATION TEST=======
...
[main] INFO com.foo.impl.Bar - 
[main] INFO com.foo.impl.Bar - 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.048 s 
- in com.foo.impl.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.impl ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for com.foo 1.0.0:
[INFO] 
[INFO] com.foo ............................................ SUCCESS [  0.004 s]
[INFO] com.foo.api ........................................ SUCCESS [  1.796 s]
[INFO] com.foo.impl ....................................... SUCCESS [  2.320 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.214 s
[INFO] Finished at: 2020-05-19T17:30:43+03:00
[INFO] ------------------------------------------------------------------------

pavel@pc1:~/Temp/maven-surefire/surefire-its/src/test/resources/surefire-1570$ 
rm -rf target
pavel@pc1:~/Temp/maven-surefire/surefire-its/src/test/resources/surefire-1570$

{code}



> 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
>            Assignee: Tibor Digana
>            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)

Reply via email to