You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/05/05 23:32:44 UTC

[GitHub] [maven-surefire] Tibor17 opened a new pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Tibor17 opened a new pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] cowwoc commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
cowwoc commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-628312834


   @Tibor17 I'm a bit stuck. Can you please check out https://github.com/cowwoc/maven-surefire/tree/surefire-1629 and let me know why `mvn install -P run-its -Dinvoker.test=Surefire1629* -Dmaven.test.skip verify` does not trigger the surefire-1629 test I've added?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-629624526


   @cowwoc 
   @sormuras 
   We need to answer the following question quite fast.
   
   Currently this is the Java arg file we generate by the plugin in order the `src/main/java/module-info.java` exists (or java version e.g. `java15`).
   What should be changed in this arg file?
   
   ```
   --module-path
   "C:\\vcs\\release\\RELEASE-3.0.0-M1\\surefire-its\\src\\test\\resources\\java9-full-api\\target\\java9-full-api-1.0.jar"
   --class-path
   "c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-booter\\3.0.0-SNAPSHOT\\surefire-booter-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-api\\3.0.0-SNAPSHOT\\surefire-api-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-logger-api\\3.0.0-SNAPSHOT\\surefire-logger-api-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-shared-utils\\3.0.0-M4\\surefire-shared-utils-3.0.0-M4.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-extensions-spi\\3.0.0-SNAPSHOT\\surefire-extensions-spi-3.0.0-SNAPSHOT.jar;C:\\vcs\\release\\RELEASE-3.0.0-M1\\surefire-its\\src\\test\\resources\\java9-full-api\\target\\test-classes;c:\\Users\\tibor17\\.m2\\repository\\junit\\junit\\4.13\\junit-4.13.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\transaction\\javax.transaction-api\\1.2\\javax.transaction-api-1.2.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\xml\\ws\\jaxws-api\\2.3.0\\jaxws-api-2.3.0.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\xml\\soap\\javax.xml.soap-api\\1.4.0\\javax.xml.soap-api-1.4.0.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\xml\\bind\\jaxb-api\\2.3.0\\jaxb-api-2.3.0.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-junit4\\3.0.0-SNAPSHOT\\surefire-junit4-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-java5\\3.0.0-SNAPSHOT\\common-java5-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-junit3\\3.0.0-SNAPSHOT\\common-junit3-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-junit4\\3.0.0-SNAPSHOT\\common-junit4-3.0.0-SNAPSHOT.jar"
   --patch-module
   java9.full.api="C:\\vcs\\release\\RELEASE-3.0.0-M1\\surefire-its\\src\\test\\resources\\java9-full-api\\target\\test-classes"
   --add-exports
   java9.full.api/J9IT=ALL-UNNAMED
   --add-modules
   java9.full.api
   --add-reads
   java9.full.api=ALL-UNNAMED
   org.apache.maven.surefire.booter.ForkedBooter
   ```
   
   I guess we will remove the lines 5 - 12.
   This meand `--patch-module`, `--add-exports`, `--add-modules`, `--add-reads`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] cowwoc commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
cowwoc commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-631622526


   @Tibor17 FYI, I am still working on this (albeit slowly). I just wanted to let you know I found an unrelated bug in the project.
   
   * In the root project, we have `jvm.args.tests` which contains `-Xms128m -Xmx144m`.
   * In the surefire-its project, we have a `maven-failsafe-plugin` plugin declaration with `argLine` containing `-Xmx64m`.
   
   If you run integration tests in IDEA, it runs the JVM using `-Xms128m -Xmx144m -Xmx64m`. The JDK then shuts down complaining that the initial heap size (128m) is greater than the maximum (64m).
   
   I suggest removing `-Xmx64m` from the surefire-its project. Makes sense?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sormuras commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
sormuras commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-629632751


   You may remove every line, that is already covered by a directive configured into the `module-info.class` that resides in `java9-full-api-1.0.jar`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 merged pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 merged pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-629636202


   The tests are in `impl` and not in `api` module.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-628492821


   @Tibor17 
   There are two remarks.
   
   1. see my [comments](https://github.com/cowwoc/maven-surefire/commit/7861582df7aa7e18dff32066d01dfa439387f78a)
   2. the system property `-Dinvoker.test=Surefire1629*` should be `-Dit.test=Surefire1629IT`
   
   Hints: sometimes simple ITs can be run directly from the IDE, or from the command line (fast build):
   `install -nsu -DskipTests -DskipITs`
   `mvn install -rf :surefire-its -nsu "-Djdk.home=c:\Program Files\Java\jdk-14" -Dit.test=Java9FullApiIT`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-632440376


   @rmannibucau 
   I have a backup of your commit. Thx for the work, now this is the MP and CP. The test is successful.
   ```
   --module-path
   "com.foo.impl/target/test-classes:com.foo.impl/target/com.foo.impl-1.0.0.jar:com.foo.api/target/com.foo.api-1.0.0.jar:jakarta.persistence-api-2.2.3.jar:jakarta.ws.rs-api-2.1.6.jar:jakarta.xml.bind-api-2.3.2.jar:jakarta.activation-api-1.2.1.jar:slf4j-api-1.8.0-beta2.jar:slf4j-simple-1.8.0-beta2.jar:junit-jupiter-engine-5.6.2.jar:apiguardian-api-1.1.0.jar:junit-platform-engine-1.6.2.jar:opentest4j-1.2.0.jar:junit-platform-commons-1.6.2.jar:junit-jupiter-api-5.6.2.jar"
   --class-path
   "surefire-booter-3.0.0-SNAPSHOT.jar:surefire-api-3.0.0-SNAPSHOT.jar:surefire-logger-api-3.0.0-SNAPSHOT.jar:surefire-shared-utils-3.0.0-M4.jar:surefire-extensions-spi-3.0.0-SNAPSHOT.jar:surefire-junit-platform-3.0.0-SNAPSHOT.jar:common-java5-3.0.0-SNAPSHOT.jar:junit-platform-launcher-1.6.2.jar"
   org.apache.maven.surefire.booter.ForkedBooter
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] cowwoc commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
cowwoc commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633390828


   @Tibor17 Do you have an existing integration test for JUnit4 + JPMS or TestNG + JPMS that is currently failing that you want fixed? Or do you want me to add those integration tests as well?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#discussion_r420632734



##########
File path: surefire-its/src/test/resources/maven-multimodule-project-with-jpms/pom.xml
##########
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.foo</groupId>
+    <artifactId>com.foo</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.release>${java.specification.version}</maven.compiler.release>
+    </properties>
+
+    <modules>
+        <module>com.foo.api</module>
+        <module>com.foo.impl</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>jakarta.persistence</groupId>
+                <artifactId>jakarta.persistence-api</artifactId>
+                <version>2.2.3</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.ws.rs</groupId>
+                <artifactId>jakarta.ws.rs-api</artifactId>
+                <version>2.1.6</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.xml.bind</groupId>
+                <artifactId>jakarta.xml.bind-api</artifactId>
+                <version>2.3.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+               <groupId>org.junit.jupiter</groupId>
+               <artifactId>junit-jupiter-api</artifactId>
+               <version>5.6.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.junit.platform</groupId>
+                <artifactId>junit-platform-runner</artifactId>
+                <version>1.6.2</version>
+            </dependency>

Review comment:
       I was making experiments when i testing #290 .
   It should not be here of course.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-630040366


   I have got the prototype working but the real surefire forked jvm failed due to we have same Java packages in `surefire-api`, `forked-booter` and `commons-java5`.
   So there should be a new Jira ticket which would create a new package `org.apache.maven.surefire.api` in the module `surefire-api`. The package `org.apache.maven.surefire.api` would be distinct in whole project. The old packages would be renamed.
   My local implementation (not committed yet) fails on the conflict with packages:
   
   ```
   [ERROR] java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/Shutdown
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.BooterDeserializer.deserialize(BooterDeserializer.java:126)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.setupBooter(ForkedBooter.java:105)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:554)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:541)
   [ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.Shutdown
   [ERROR]         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
   [ERROR]         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   [ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   [ERROR]         ... 4 more
   [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/DumpErrorSingleton
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:560)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:541)
   [ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.DumpErrorSingleton
   [ERROR]         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
   [ERROR]         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   [ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   [ERROR]         ... 2 more
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633127002


   @cowwoc 
   Do you have some spare time to develop a project with JUnit4 and TestNG on the top of this PR?
   I want to know what CLI arguments should be added for the JVM.
   For instance the current IT with JUnit5 has these arguments:
   
   ```
           private String[] getJpmsArgs()
           {
               return new String[] {
                   "--add-modules",
                   "ALL-MODULE-PATH",
   
                   "--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"
               };
           }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] cowwoc commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
cowwoc commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-631877603


   @Tibor17 https://github.com/apache/maven-surefire/pull/299 is now ready for your review.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633546412


   @rfscholte 
   In my local test the JUnit4 is on modulepath. JUnit 4.13 is an automatic module.
   I've observed  `java.lang.NoClassDefFoundError: org/junit/runner/notification/RunNotifier` without `ALL-MODULE-PATH`. Another options `--add-opens junit/org.junit=ALL-UNNAMED --add-opens junit/org.junit.runner.notification=ALL-UNNAMED` did not help.
   This is my descriptor in `src\main\java`:
   ```
   module main
   {
       exports main;
   }
   ```
   and this is the test descriptor:
   ```
   open module test
   {
       requires main;
       requires junit;
       exports test to junit;
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-628492821


   @Tibor17 
   There are two remarks.
   
   1. see my [comments](https://github.com/cowwoc/maven-surefire/commit/7861582df7aa7e18dff32066d01dfa439387f78a)
   2. the system property `-Dinvoker.test=Surefire1629*` should be `-Dit.test=Surefire1629IT`
   
   Hints: sometimes simple ITs can be run directly from the IDE, or from the command line (fast build):
   `mvn install -nsu -DskipTests -DskipITs`
   `mvn install -rf :surefire-its -nsu "-Djdk.home=c:\Program Files\Java\jdk-14" -Dit.test=Java9FullApiIT`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-630040366


   I have got the prototype working but the real surefire forked jvm failed due to we have same Java packages (e.g. org.apache.maven.surefire.booter) in `surefire-api`, `forked-booter` and `commons-java5`.
   So there should be a new Jira ticket which would create a new package `org.apache.maven.surefire.api` in the module `surefire-api`. The package `org.apache.maven.surefire.api` would be distinct in whole project. The old packages would be renamed.
   My local implementation (not committed yet) fails on the conflict with packages:
   
   ```
   [ERROR] java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/Shutdown
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.BooterDeserializer.deserialize(BooterDeserializer.java:126)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.setupBooter(ForkedBooter.java:105)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:554)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:541)
   [ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.Shutdown
   [ERROR]         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
   [ERROR]         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   [ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   [ERROR]         ... 4 more
   [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/DumpErrorSingleton
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:560)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:541)
   [ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.DumpErrorSingleton
   [ERROR]         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
   [ERROR]         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   [ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   [ERROR]         ... 2 more
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633546412


   @rfscholte 
   In my local test the JUnit4 is on modulepath. JUnit 4.13 is an automatic module.
   I've observed  `java.lang.NoClassDefFoundError: org/junit/runner/notification/RunNotifier` without `ALL-MODULE-PATH`. Another options `--add-opens junit/org.junit=ALL-UNNAMED --add-opens junit/org.junit.runner.notification=ALL-UNNAMED` did not help.
   This is my descriptor in `src/main/java`:
   ```
   module main
   {
       exports main;
   }
   ```
   and this is the test descriptor:
   ```
   open module test
   {
       requires main;
       requires junit;
       exports test to junit;
   }
   ```
   
   This means we are missing the direction where classpath (surefire-api) is calling the module `junit`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-629624526


   @cowwoc 
   @sormuras 
   We need to answer the following question quite fast.
   
   Currently this is the Java arg file we generate by the plugin in order the `src/main/java/module-info.java` exists (or java version e.g. `java15`).
   What should be changed in this arg file?
   
   ```
   --module-path
   "C:\\vcs\\release\\RELEASE-3.0.0-M1\\surefire-its\\src\\test\\resources\\java9-full-api\\target\\java9-full-api-1.0.jar"
   --class-path
   "c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-booter\\3.0.0-SNAPSHOT\\surefire-booter-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-api\\3.0.0-SNAPSHOT\\surefire-api-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-logger-api\\3.0.0-SNAPSHOT\\surefire-logger-api-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-shared-utils\\3.0.0-M4\\surefire-shared-utils-3.0.0-M4.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-extensions-spi\\3.0.0-SNAPSHOT\\surefire-extensions-spi-3.0.0-SNAPSHOT.jar;C:\\vcs\\release\\RELEASE-3.0.0-M1\\surefire-its\\src\\test\\resources\\java9-full-api\\target\\test-classes;c:\\Users\\tibor17\\.m2\\repository\\junit\\junit\\4.13\\junit-4.13.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\transaction\\javax.transaction-api\\1.2\\javax.transaction-api-1.2.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\xml\\ws\\jaxws-api\\2.3.0\\jaxws-api-2.3.0.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\xml\\soap\\javax.xml.soap-api\\1.4.0\\javax.xml.soap-api-1.4.0.jar;c:\\Users\\tibor17\\.m2\\repository\\javax\\xml\\bind\\jaxb-api\\2.3.0\\jaxb-api-2.3.0.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-junit4\\3.0.0-SNAPSHOT\\surefire-junit4-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-java5\\3.0.0-SNAPSHOT\\common-java5-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-junit3\\3.0.0-SNAPSHOT\\common-junit3-3.0.0-SNAPSHOT.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-junit4\\3.0.0-SNAPSHOT\\common-junit4-3.0.0-SNAPSHOT.jar"
   --patch-module
   java9.full.api="C:\\vcs\\release\\RELEASE-3.0.0-M1\\surefire-its\\src\\test\\resources\\java9-full-api\\target\\test-classes"
   --add-exports
   java9.full.api/J9IT=ALL-UNNAMED
   --add-modules
   java9.full.api
   --add-reads
   java9.full.api=ALL-UNNAMED
   org.apache.maven.surefire.booter.ForkedBooter
   ```
   
   I guess we will remove the lines 5 - 12.
   This means `--patch-module`, `--add-exports`, `--add-modules`, `--add-reads`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-630040366


   I have got the prototype working but the real surefire forked jvm failed due to we have same Java packages (e.g. `org.apache.maven.surefire.booter`) in `surefire-api`, `forked-booter` and `commons-java5`.
   So there should be a new Jira ticket which would create a new package `org.apache.maven.surefire.api` in the module `surefire-api`. The package `org.apache.maven.surefire.api` would be distinct in whole project. The old packages would be renamed.
   My local implementation (not committed yet) fails on the conflict with packages:
   
   ```
   [ERROR] java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/Shutdown
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.BooterDeserializer.deserialize(BooterDeserializer.java:126)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.setupBooter(ForkedBooter.java:105)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:554)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:541)
   [ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.Shutdown
   [ERROR]         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
   [ERROR]         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   [ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   [ERROR]         ... 4 more
   [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/DumpErrorSingleton
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:560)
   [ERROR]         at org.apache.maven.surefire.booter@3.0.0-SNAPSHOT/org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:541)
   [ERROR] Caused by: java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.DumpErrorSingleton
   [ERROR]         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
   [ERROR]         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   [ERROR]         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
   [ERROR]         ... 2 more
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-632609027


   > 
   > 
   > @Tibor17 #299 is now ready for your review.
   
   Thx, i will have a look in your branch during the weekend.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-631811707


   @cowwoc 
   In the module `surefire-its` move the value of `argLine` to a new property `jvm.args.tests`.
   Then the argLine will reference it via `<argLine>${jvm.args.tests}</argLine>`.
   This should be right solution for both IDEA and Maven.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] rfscholte commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
rfscholte commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633517786


   I am the one responsible for adding of 'ALL-MODULE-PATH' to the JPMS specs, but discovered I don't need it anymore. It is a simple but brute way to everything see everything. maven-compiler-plugin nor maven-javadoc-plugin is using it anymore, all is handled via building up the right request for LocationManager in Plexus Java


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#discussion_r420632734



##########
File path: surefire-its/src/test/resources/maven-multimodule-project-with-jpms/pom.xml
##########
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.foo</groupId>
+    <artifactId>com.foo</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.release>${java.specification.version}</maven.compiler.release>
+    </properties>
+
+    <modules>
+        <module>com.foo.api</module>
+        <module>com.foo.impl</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>jakarta.persistence</groupId>
+                <artifactId>jakarta.persistence-api</artifactId>
+                <version>2.2.3</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.ws.rs</groupId>
+                <artifactId>jakarta.ws.rs-api</artifactId>
+                <version>2.1.6</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.xml.bind</groupId>
+                <artifactId>jakarta.xml.bind-api</artifactId>
+                <version>2.3.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+               <groupId>org.junit.jupiter</groupId>
+               <artifactId>junit-jupiter-api</artifactId>
+               <version>5.6.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.junit.platform</groupId>
+                <artifactId>junit-platform-runner</artifactId>
+                <version>1.6.2</version>
+            </dependency>

Review comment:
       I was making experiments when testing #290 .
   It should not be here of course.

##########
File path: surefire-its/src/test/resources/maven-multimodule-project-with-jpms/pom.xml
##########
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.foo</groupId>
+    <artifactId>com.foo</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.release>${java.specification.version}</maven.compiler.release>
+    </properties>
+
+    <modules>
+        <module>com.foo.api</module>
+        <module>com.foo.impl</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>jakarta.persistence</groupId>
+                <artifactId>jakarta.persistence-api</artifactId>
+                <version>2.2.3</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.ws.rs</groupId>
+                <artifactId>jakarta.ws.rs-api</artifactId>
+                <version>2.1.6</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.xml.bind</groupId>
+                <artifactId>jakarta.xml.bind-api</artifactId>
+                <version>2.3.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+               <groupId>org.junit.jupiter</groupId>
+               <artifactId>junit-jupiter-api</artifactId>
+               <version>5.6.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.junit.platform</groupId>
+                <artifactId>junit-platform-runner</artifactId>
+                <version>1.6.2</version>
+            </dependency>

Review comment:
       I was making experiments while testing #290 .
   It should not be here of course.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-628492821


   @cowwoc
   There are two remarks.
   
   1. see my [comments](https://github.com/cowwoc/maven-surefire/commit/7861582df7aa7e18dff32066d01dfa439387f78a)
   2. the system property `-Dinvoker.test=Surefire1629*` should be `-Dit.test=Surefire1629IT`
   
   Hints: sometimes simple ITs can be run directly from the IDE, or from the command line (fast build):
   `mvn install -nsu -DskipTests -DskipITs`
   `mvn install -rf :surefire-its -nsu "-Djdk.home=c:\Program Files\Java\jdk-14" -Dit.test=Java9FullApiIT`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-632440376


   @rmannibucau 
   I have a backup of your commit. Thx for the work, now this is the MP and CP. The test is successful.
   ```
   --module-path
   "com.foo.impl/target/test-classes;com.foo.impl/target/com.foo.impl-1.0.0.jar;com.foo.api/target/com.foo.api-1.0.0.jar;jakarta.persistence-api-2.2.3.jar;jakarta.ws.rs-api-2.1.6.jar;jakarta.xml.bind-api-2.3.2.jar;jakarta.activation-api-1.2.1.jar;slf4j-api-1.8.0-beta2.jar;slf4j-simple-1.8.0-beta2.jar;junit-jupiter-engine-5.6.2.jar;apiguardian-api-1.1.0.jar;junit-platform-engine-1.6.2.jar;opentest4j-1.2.0.jar;junit-platform-commons-1.6.2.jar;junit-jupiter-api-5.6.2.jar"
   --class-path
   "surefire-booter-3.0.0-SNAPSHOT.jar;surefire-api-3.0.0-SNAPSHOT.jar;surefire-logger-api-3.0.0-SNAPSHOT.jar;surefire-shared-utils-3.0.0-M4.jar;surefire-extensions-spi-3.0.0-SNAPSHOT.jar;surefire-junit-platform-3.0.0-SNAPSHOT.jar;common-java5-3.0.0-SNAPSHOT.jar;junit-platform-launcher-1.6.2.jar"
   org.apache.maven.surefire.booter.ForkedBooter
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-624366880


   @cowwoc
   This is the integration test i promised to write.
   We are missing the descriptor `module-info.java` in `src/test/java` in the impl module.
   Do you have a guess how it would be?
   I guess we should update this integration test with the descriptor so that it would cover these five issues which are related to the JPMS problem:
   https://issues.apache.org/jira/browse/SUREFIRE-1563
   https://issues.apache.org/jira/browse/SUREFIRE-1570
   https://issues.apache.org/jira/browse/SUREFIRE-1629
   https://issues.apache.org/jira/browse/SUREFIRE-1733
   https://issues.apache.org/jira/browse/SUREFIRE-1765
   
   You attached the test in SUREFIRE-1629. Perhaps your test should be compared with mine and we can add missing things.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633510292


   @cowwoc 
   I wrote the JPMS test with JUnit4 as well.
   The only I had to add was `--add-modules ALL-MODULE-PATH`.
   I will add those ITs, no problem.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633546412


   @rfscholte 
   In my local test the JUnit4 is on modulepath. JUnit 4.13 is an automatic module.
   I've observed  `java.lang.NoClassDefFoundError: org/junit/runner/notification/RunNotifier` without `ALL-MODULE-PATH`. Another options `--add-opens junit/org.junit=ALL-UNNAMED --add-opens junit/org.junit.runner.notification=ALL-UNNAMED` did not help.
   This is my descriptor in `src/main/java`:
   ```
   module main
   {
       exports main;
   }
   ```
   and this is the test descriptor:
   ```
   open module test
   {
       requires main;
       requires junit;
       exports test to junit;
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sormuras commented on a change in pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
sormuras commented on a change in pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#discussion_r420525520



##########
File path: surefire-its/src/test/resources/maven-multimodule-project-with-jpms/pom.xml
##########
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.foo</groupId>
+    <artifactId>com.foo</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.release>${java.specification.version}</maven.compiler.release>
+    </properties>
+
+    <modules>
+        <module>com.foo.api</module>
+        <module>com.foo.impl</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>jakarta.persistence</groupId>
+                <artifactId>jakarta.persistence-api</artifactId>
+                <version>2.2.3</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.ws.rs</groupId>
+                <artifactId>jakarta.ws.rs-api</artifactId>
+                <version>2.1.6</version>
+            </dependency>
+            <dependency>
+                <groupId>jakarta.xml.bind</groupId>
+                <artifactId>jakarta.xml.bind-api</artifactId>
+                <version>2.3.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>1.8.0-beta2</version>
+            </dependency>
+            <dependency>
+               <groupId>org.junit.jupiter</groupId>
+               <artifactId>junit-jupiter-api</artifactId>
+               <version>5.6.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.junit.platform</groupId>
+                <artifactId>junit-platform-runner</artifactId>
+                <version>1.6.2</version>
+            </dependency>

Review comment:
       Why is `junit-platform-runner` required here?
   
   It's purpose is to run JUnit 5 tests on JUnit 4 infrastructure.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #293: [SUREFIRE-1733] Surefire and Failsafe JPMS additions for JUnit 5.x execution

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #293:
URL: https://github.com/apache/maven-surefire/pull/293#issuecomment-633127002


   @cowwoc 
   Do you have some spare time to develop a project with JUnit4 and TestNG on the top of this PR?
   I want to know what CLI arguments should be added for the JVM.
   For instance the current IT with JUnit5 has these arguments:
   
   ```
   private String[] getJpmsArgs()
   {
   	return new String[] {
   		"--add-modules",
   		"ALL-MODULE-PATH",
   
   		"--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"
   	};
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org