[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-25 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] Of course. But that project I deleted already. Take [this 
one|https://github.com/PashaTurok/plugin-jpms] that includes both unit and 
integration tests.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-25 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K] Can we reuse [your 
project|https://github.com/PashaTurok/surefire-jpms] in our [integration 
tests|https://github.com/apache/maven-surefire/tree/master/surefire-its/src/test/resources]
 and documentation? Of course we will fix it to have it working. I want to show 
the users a multimodule project with JPMS.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-25 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K] The fix is in master and now the console logs will contain JPMS 
errors. Pls check it out.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-24 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K] The issue was created SUREFIRE-1780.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-24 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] Answering to your suggestion:

{quote}Maybe what we can do for you more is to print these errors as soon as 
the JVM corrupts the native stream with:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.ws.rs not found, required by 
com.foo.api{quote}

I think it is absolutely necessary. There can be tens and hundreds dependencies 
so it is simple not possible to work without it.


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-24 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] Thank you for your clarification. I am not maven expert, so I 
asked a question on SO [here|https://stackoverflow.com/questions/61407603/]. 
Please, see if I explained everything right in it.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-24 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
Not necessary to stop talking but i want to show you where the problems are in 
your project.
You have a project {{com.foo.plugin}} which depends on project {{com.foo.api}}. 
You have declared dependencies in {{com.foo.api}} and you are managing the 
dependencies in the parent POM. This should be used in order to have the 
versions in one place without the scope. And the provlem is the scope. This way 
the Jakarta EE artifacts could not be inherited to the {{com.foo.plugin}} and 
the Surefire in {{com.foo.plugin}} could not see them. That's the reason why 
the JVM says:
*Error occurred during initialization of boot layer*
*java.lang.module.FindException: Module java.ws.rs not found, required by 
com.foo.api*

The way how i added another artifacts of the old JAVAX i have only bypased the 
problem of wrongly written parent POM. Pls remove these lines and it should be 
fine:
https://github.com/PashaTurok/surefire-jpms/blob/master/pom.xml#L55
https://github.com/PashaTurok/surefire-jpms/blob/master/pom.xml#L62
https://github.com/PashaTurok/surefire-jpms/blob/master/pom.xml#L68
https://github.com/PashaTurok/surefire-jpms/blob/master/pom.xml#L87

If you need to have such a scope, then repeat the artifacts in 
{{com.foo.plugin}}, this means WS and JAXB and the test would work again 
because all the declared modules will appear on the module path.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-24 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] You said that you fixed my problem by adding to com.foo.api the 
following code:


{code:java}

javax.xml.bind
jaxb-api
   2.3.1


javax.ws.rs
javax.ws.rs-api
2.1.1

{code}


Ok, lets see. For simplicity let's throw out java.persistence. This is 
module-info of com.foo.api


{code:java}
module com.foo.api {
requires org.slf4j;
requires java.ws.rs;
requires java.xml.bind;
}

{code}

In pom of com.foo.api we have:

{code:java}

org.slf4j
slf4j-api

  
jakarta.ws.rs
jakarta.ws.rs-api


jakarta.xml.bind
jakarta.xml.bind-api

{code}


In slf4j-api-1.8.0-beta2.jar there is a module-info: module org.slf4j { }
In jakarta.ws.rs-api-2.1.6.jar there is a module-info: module java.ws.rs {...}
In jakarta.xml.bind-api-2.3.2.jar there is a module-info: module java.xml.bind 
{...}

So, trying to build foo project I get:

{code:java}
Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on 
project com.foo.plugin: There are test failures.

Error occurred in starting fork, check output in log
Process Exit Code: 1
org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
terminated without properly saying goodbye. VM crash or System.exit called?

Error occurred in starting fork, check output in log
Process Exit Code: 1
at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:690)
at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:248)

{code}

Say, please, do you still think that my code is not correct and it is necessary 
to add the dependencies that you listed OR the problem is in surefire plugin? 
To tell the truth it is the third day while we are talking and only same talks. 
So, let's understand either we fix something or stop talking.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
>> Put only those that are required in module-info of the module that is being 
>> tested and in module-info of its dependencies. 

It is exactly what we are doing and we use {{plexus-java}} for that as 
[~rfscholte] mentioned. See your printed line {{Lets see JDKModulePath}} - 
there is the {{com.foo.api}} module on module path.

>> Let's think this way - on module path we put only those jar that either have 
>> module-info or are required in module-info (so some module is going to use 
>> it as automatic module). 

The automatic modules are on th emodule path. I checked!


Maybe what we can do for you more is to print these errors as soon as the JVM 
corrupts the native stream with:
{noformat}
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.ws.rs not found, required by 
com.foo.api
{noformat}
Do you want to open a new issue and fix it? It's very easy, just extend [this 
condition|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/EventConsumerThread.java#L227]
 making a lookup for the above two strings.



> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
I have fixed your problem by adding these dependencies in {{com.foo.api}}:

{code:xml}

javax.xml.bind
jaxb-api
   2.3.1


javax.ws.rs
javax.ws.rs-api
2.1.1

{code}

and the result is this:


{noformat}
[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 - Hello! I am a JPMS module and I use SLF4J 
as a JPMS module!
[main] INFO com.foo.plugin.BarTest - We must be on module path, let's check
[main] INFO com.foo.plugin.BarTest -
[main] INFO com.foo.plugin.BarTest - Lets see JDKModulePath: 
C:\vcs\github\surefire-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\surefire-jpms\com.foo.api\target\classes;c:\Users\tibor17\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;c:\Users\tibor17\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;c:\Users\tibor17\.m2\repository\javax\ws\rs\javax.ws.rs-api\2.1.1\javax.ws.rs-api-2.1.1.jar;c:\Users\tibor17\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.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 - This is list of modules in boot layer:
[main] INFO com.foo.plugin.BarTest - jdk.naming.rmi
[main] INFO com.foo.plugin.BarTest - java.ws.rs
[main] INFO com.foo.plugin.BarTest - java.xml.crypto
[main] INFO com.foo.plugin.BarTest - jdk.net
[main] INFO com.foo.plugin.BarTest - java.compiler
[main] INFO com.foo.plugin.BarTest - jdk.internal.opt
[main] INFO com.foo.plugin.BarTest - com.foo.plugin
[main] INFO com.foo.plugin.BarTest - java.desktop
[main] INFO com.foo.plugin.BarTest - jdk.crypto.cryptoki
[main] INFO com.foo.plugin.BarTest - jdk.internal.le
[main] INFO com.foo.plugin.BarTest - jdk.editpad
[main] INFO com.foo.plugin.BarTest - jdk.unsupported
[main] INFO com.foo.plugin.BarTest - jdk.jartool
[main] INFO com.foo.plugin.BarTest - jdk.jdwp.agent
[main] INFO com.foo.plugin.BarTest - java.xml.bind
[main] INFO com.foo.plugin.BarTest - org.slf4j
[main] INFO com.foo.plugin.BarTest - jdk.unsupported.desktop
[main] INFO com.foo.plugin.BarTest - jdk.jstatd
[main] INFO com.foo.plugin.BarTest - jdk.security.auth
[main] INFO com.foo.plugin.BarTest - java.scripting
[main] INFO com.foo.plugin.BarTest - java.prefs
[main] INFO com.foo.plugin.BarTest - org.slf4j.simple
[main] INFO com.foo.plugin.BarTest - java.security.sasl
[main] INFO com.foo.plugin.BarTest - java.rmi
[main] INFO com.foo.plugin.BarTest - java.xml
[main] INFO com.foo.plugin.BarTest - com.foo.api
[main] INFO com.foo.plugin.BarTest - java.management
[main] INFO com.foo.plugin.BarTest - jdk.localedata
[main] INFO com.foo.plugin.BarTest - jdk.internal.ed
[main] INFO com.foo.plugin.BarTest - jdk.zipfs
[main] INFO com.foo.plugin.BarTest - jdk.sctp
[main] INFO com.foo.plugin.BarTest - jdk.jconsole
[main] INFO com.foo.plugin.BarTest - jdk.management.agent
[main] INFO com.foo.plugin.BarTest - jdk.charsets
[main] INFO com.foo.plugin.BarTest - java.datatransfer
[main] INFO com.foo.plugin.BarTest - jdk.compiler
[main] INFO com.foo.plugin.BarTest - jdk.management.jfr
[main] INFO com.foo.plugin.BarTest - java.sql.rowset
[main] INFO com.foo.plugin.BarTest - jdk.crypto.mscapi
[main] INFO com.foo.plugin.BarTest - jdk.jdeps
[main] INFO com.foo.plugin.BarTest - jdk.security.jgss
[main] INFO com.foo.plugin.BarTest - java.sql
[main] INFO com.foo.plugin.BarTest - java.logging
[main] INFO com.foo.plugin.BarTest - jdk.attach
[main] INFO com.foo.plugin.BarTest - java.persistence
[main] INFO com.foo.plugin.BarTest - jdk.scripting.nashorn
[main] INFO com.foo.plugin.BarTest - jdk.dynalink
[main] INFO com.foo.plugin.BarTest - jdk.internal.jvmstat
[main] INFO com.foo.plugin.BarTest - java.instrument
[main] INFO com.foo.plugin.BarTest - jdk.naming.dns
[main] INFO com.foo.plugin.BarTest - jdk.jlink
[main] INFO com.foo.plugin.BarTest - java.naming
[main] INFO com.foo.plugin.BarTest - java.management.rmi
[main] INFO com.foo.plugin.BarTest - jdk.jdi
[main] INFO com.foo.plugin.BarTest - jdk.xml.dom
[main] INFO com.foo.plugin.BarTest - jdk.jfr
[main] INFO com.foo.plugin.BarTest - jdk.jsobject
[main] INFO com.foo.plugin.BarTest - jdk.crypto.ec
[main] INFO com.foo.plugin.BarTest - jdk.management
[main] INFO com.foo.plugin.BarTest - java.smartcardio
[main] INFO com.foo.plugin.BarTest - jdk.javadoc
[main] INFO 

[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Robert Scholte (Jira)


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

Robert Scholte commented on SUREFIRE-1262:
--

https://codehaus-plexus.github.io/plexus-languages/plexus-java/usage.html 
describes it. This library is used by several plugins, including compiler, 
javadoc, surefire and failsafe and has proven that it works. It is aware of 
automatic modules, explicit and unnamed modules. If you think one of the jars 
is put on the wrong path, show me and explain why.


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~rfscholte] I wouldn't advice to put all modules on module-path as there are a 
lot of libraries that don't work well there. Put only those that are required 
in module-info of the module that is being tested and in module-info of its 
dependencies. 

Let's think this way - on module path we put only those jar that either have 
module-info or are required in module-info (so some module is going to use it 
as automatic module).  

For example, foo.jar has module-info and requires bar.jar. Bar.jar doesn't have 
module-info and it uses baz.jar. Baz.jar doesn't have module-info. So, foo.jar 
(explicit module), bar.jar (automatic module) are on module-path, baz is on 
class-path (unnamed module).

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Robert Scholte (Jira)


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

Robert Scholte commented on SUREFIRE-1262:
--

I'm a bit lost. As far as I can see it all still works as expected.
But I can answer by not simply but all libraries on the module-path? I wanted 
the module path to only contain the used modules the prevent any possible side 
effects. 

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
Regarding 1) it is Surefire and not Failsafe, so the module path must contain 
classes dir having module-info.class in it. So from my point it is ok.

Regarding the 2), maybe you are right but this agrs file was designed by 
[~rfscholte] so I would like to hear his reasons why we simply did not put all 
libraries to the module path.

[~rfscholte] pls see the points 1) and 2) as a reference in 
https://issues.apache.org/jira/browse/SUREFIRE-1262?focusedCommentId=17090549=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17090549

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] 

`The dump files are produced by the JVM, saying: Error occurred during 
initialization of boot layer
java.lang.module.FindException: Module java.xml.bind not found, required by 
com.foo.api 
It looks like we are missing the JAXB library.`

Maybe you are right.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] What do you think about #1 here 
https://issues.apache.org/jira/browse/SUREFIRE-1262?focusedCommentId=17090549=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17090549
 ?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] This is my report 

~/Temp/surefire-jpms/com.foo.plugin/target/surefire-reports$ cat 
2020-04-23T15-09-06_657-jvmRun1.dumpstream 
# Created at 2020-04-23T15:09:07.825
Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 
'Error occurred during initialization of boot layer'.



> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
Did you see the dump files in {{com.foo.plugin\target\surefire-reports\}}?
Many users don't read the console error log:

{noformat}
[ERROR] Please refer to 
C:\vcs\github\surefire-jpms\com.foo.plugin\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.
{noformat}

The dump files are produced by the JVM, saying:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module *java.xml.bind* not found, required by 
com.foo.api

It looks like we are missing the JAXB library.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
How you see this problem with adding {{--add-opens}}? See our discussion in 
last few comments above. Is it worth to discuss it in jigsaw-dev mailing list?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] And two moments more

1)  if the code you provided above is about compiling `com.foo.plugin` then I 
think this is wrong:
--module-path ... 
C:\\vcs\\github\\surefire-jpms\\com.foo.api\\target\\classes;...
I think it must be reference to com.foo.api in maven repo.

2) You wrote  "i haven't noticed Automatic-Module-Name in the manifest file". 
It is not important if module has or hasn't `Automatic-Module-Name` in 
manifest. If you add plain jar (with it without such entry in manifest) to 
module-path it will become automatic module. The difference will be only in a 
way how JPMS will define name for it.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

So, one by one 

1) --module-path ... 
C:\\vcs\\github\\surefire-jpms\\com.foo.plugin\\target\\classes; - I don't know 
if it is correct. I worked only with jars and directories containing jars, but 
if it works...

2) --class-path ... 
C:\\vcs\\github\\surefire-jpms\\com.foo.plugin\\target\\test-classes; 

--patch-module 
com.foo.plugin="C:\\vcs\\github\\surefire-jpms\\com.foo.plugin\\target\\test-classes"
Maybe we need to leave only `--patch-module`? Or it doesn't work if they are 
not on class path?

3) --add-modules com.foo.plugin .. to tell the truth I don't understand it. We 
do have it on module path, see #1.

4) I would also try to add --add-opens com.foo.plugin/com.foo.plugin=ALL-UNNAMED

If my notes don't help, you can ask about best JPMS configuration for unit 
testing in jigsaw-dev mailing list. They give very good answers.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
Do you see any problem in the args file?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


You'r right, i haven't noticed {{Automatic-Module-Name}} in the manifest file.
I have used your project, executed the build with debug logs and I see the 
automatic module {{javax.persistence-api-2.2.jar}} on the module path. This is 
how the JVM is started using the args file:

{noformat}
[DEBUG] Forking command line: cmd.exe /X /C ""c:\Program 
Files\Java\jdk-11.0.2\bin\java" 
@C:\Users\tibor17\AppData\Local\Temp\surefire14795135659805170703\surefireargs10392419846920729243
 C:\Users\tibor17\AppData\Local\Temp\surefire14795135659805170703 
2020-04-23T12-17-51_047-jvmRun1 surefire9803582385134592733tmp 
surefire_03356188385539628095tmp"
{noformat}

and this is the content in the args file:

{noformat}
[DEBUG] Path to args file: 
C:\Users\tibor17\AppData\Local\Temp\surefire14795135659805170703\surefireargs10392419846920729243
[DEBUG] args file content:
--module-path
"C:\\vcs\\github\\surefire-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\\surefire-jpms\\com.foo.api\\target\\classes;c:\\Users\\tibor17\\.m2\\repository\\javax\\persistence\\javax.persistence-api\\2.2\\javax.persistence-api-2.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.8.0-beta2\\slf4j-api-1.8.0-beta2.jar"
--class-path
"c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-booter\\3.0.0-M4\\surefire-booter-3.0.0-M4.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-api\\3.0.0-M4\\surefire-api-3.0.0-M4.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-logger-api\\3.0.0-M4\\surefire-logger-api-3.0.0-M4.jar;C:\\vcs\\github\\surefire-jpms\\com.foo.plugin\\target\\test-classes;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\jupiter\\junit-jupiter-engine\\5.5.2\\junit-jupiter-engine-5.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apiguardian\\apiguardian-api\\1.1.0\\apiguardian-api-1.1.0.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-engine\\1.5.2\\junit-platform-engine-1.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\opentest4j\\opentest4j\\1.2.0\\opentest4j-1.2.0.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-commons\\1.5.2\\junit-platform-commons-1.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\jupiter\\junit-jupiter-api\\5.5.2\\junit-jupiter-api-5.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-runner\\1.5.2\\junit-platform-runner-1.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\junit\\junit\\4.12\\junit-4.12.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-launcher\\1.5.2\\junit-platform-launcher-1.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\junit\\platform\\junit-platform-suite-api\\1.5.2\\junit-platform-suite-api-1.5.2.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\hamcrest\\hamcrest-all\\1.3\\hamcrest-all-1.3.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\surefire-junit-platform\\3.0.0-M4\\surefire-junit-platform-3.0.0-M4.jar;c:\\Users\\tibor17\\.m2\\repository\\org\\apache\\maven\\surefire\\common-java5\\3.0.0-M4\\common-java5-3.0.0-M4.jar"
--patch-module
com.foo.plugin="C:\\vcs\\github\\surefire-jpms\\com.foo.plugin\\target\\test-classes"
--add-exports
com.foo.plugin/com.foo.plugin=ALL-UNNAMED
--add-modules
com.foo.plugin
--add-reads
com.foo.plugin=ALL-UNNAMED
org.apache.maven.surefire.booter.ForkedBooter
{noformat}




> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-23 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] No, I think that is not correct.

 1) Try to remove all `requires` in API module-info and add to API the 
following class: @Entity public class User {}. If you don't add `requires 
java.persistence` you will get `package javax.persistence is not visible   
(package javax.persistence is declared in module java.persistence, but module 
com.foo.api does not read` compilation error. 

2) why do you think that javax.persistence-api-2.2.jar is unnamed module? Take 
a look at its manifest and you will see `Automatic-Module-Name: 
java.persistence`. 

3) It seems that you think if there is no module-info it must be on classpath. 
No, we can take any jar (without module-info), put it on module-path and use it 
as usual module. JPMS will create from such `plain jar`  automatic module. 
Automatic modules are plain JARs (no module descriptor) on the module path. 
Automatic modules ARE NOT unnamed modules.

Automatic Modules – We can include unofficial modules by adding existing JAR 
files to the module path. The name of the module will be derived from the name 
of the JAR. Automatic modules will have full read access to every other module 
loaded by the path.
Unnamed Module – When a class or JAR is loaded onto the classpath, but not the 
module path, it's automatically added to the unnamed module. It's a catch-all 
module to maintain backward compatibility with previously-written Java code. 

Take a look here https://stackoverflow.com/a/46742802/5057736 

So, it seems my code is right, by surefire has problems with automatic modules.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
e.g. {{javax.persistence-api-2.2.jar}} is unnamed module. Why you use 
{{requires java.persistence;}} for unnamed modules?
(java*x*)
The Surefire is able to extract unnamed modules to class path.
The test project must be first in good conditions written before investigating 
Surefire bug.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] I think that com.foo.plugin is tested if it doesn't use 
com.foo.api. And the problem in com.foo.api  is in module-info - try to remove 
all `requires` except slf4j. Hope it will help.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
I need you to investigate our [integration 
test|https://github.com/apache/maven-surefire/tree/master/surefire-its/src/test/resources/modulepath],
 why it works and we don't {{open pkg}}.
The next ITs:
https://github.com/apache/maven-surefire/tree/master/surefire-its/src/test/resources/surefire-1534-reuse-forks-false-java-module
https://github.com/apache/maven-surefire/tree/master/surefire-its/src/test/resources/surefire-1712-extracted-modulename-without-asm

The question is, what's different with your project.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] What about your question - could explain what you mean 
`ClassLoader in Java 11` can recognize module path by itself? Maybe you will 
find answer in Alan's answer to this question 
https://stackoverflow.com/questions/61195909/what-is-the-relation-between-modulelayer-and-classloader
 

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] I found out why I added forkCount. Here is almost empty project. 
Please, do the following: git clone 
https://github.com/PashaTurok/surefire-jpms.git, mvn clean install. I added 
forkCount=0 because it doesn't work without it, however, when I add forkCount=0 
I can't use module path.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] Wow it seems to work. But in real project I had to add 
forkCount=0 because it gave an error (I will say later). However, when I run 
test it requires me to open com.foo.plugin. I think this is a bad way - we 
don't need to open the packages we test. Have you tried to open all packages 
automatically for testing using this method 
https://docs.oracle.com/javase/9/docs/api/java/lang/Module.html#addOpens-java.lang.String-java.lang.Module-
 ?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
This is the problem

{code:xml}
0
{code}

Such a configuration means that all jar files, target/classes and 
target/test-classes are added to an isolated ClassLoader. It does not fork a 
new JVM. Here maybe you can clarify how the JPMS should behave whether the 
ClassLoader in Java 11 can recognize module path by itself.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~tibordigana] Thank you for your answer. Run mvn test for this project 
https://github.com/PashaTurok/surefire-jpms.
Read the output. 

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Tibor Digana (Jira)


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

Tibor Digana commented on SUREFIRE-1262:


[~Pavel_K]
Yes it works but some limitations exist which depends on the details of your 
project. Can you post your project on GH?
Maybe the problem you see is already reported.
Let's start with reproducing the issue on our side. Pls describe on GH how the 
project should be used and where you see the problem. Thx

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

When maven-compiler-plugin:3.6.2:testCompile compiles my jpms module it shows 
Classpath and Modulepath and they are correct, because on Modulepath I see the 
jpms modules I use in my module.

However, when maven-surefire-plugin:3.0.0-M4:test is executing I see only test 
classpath, provider classpath, test(compact) classpath, provider(compact) 
classpath, in-process classpath, in-process(compact) classpath and all my 
modules go are listed in test classpath.

Are you sure this feature works? Or maybe I must activate it somehow? Could 
anyone explain?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-22 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~rfscholte] Thank you very much for your help. However, moving in that 
direction I got several questions which I posted on SO here 
https://stackoverflow.com/questions/61368033/mixing-classpath-and-module-path-in-maven-surefire-plugin
 

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-20 Thread Robert Scholte (Jira)


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

Robert Scholte commented on SUREFIRE-1262:
--

If you run {{mvn test -X}} you'll see both module path and classpath in the 
surefire configuration and how the jars are divided.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2020-04-19 Thread Pavel_K (Jira)


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

Pavel_K commented on SUREFIRE-1262:
---

[~rfscholte] Could you give some details. For example, I have moduleA with 
module-info.java and I run maven-surefire-plugin v.3.0.0-M4 for testing this 
moduleA. In my test I check `System.getProperty("jdk.module.path")`, but this 
system property returns null. Or I do something wrong or moduleA is not on 
module-path.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2018-11-01 Thread Tibor Digana (JIRA)


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

Tibor Digana commented on SUREFIRE-1262:


[~aaime]
[~rfscholte]
Maybe this helps:
[ModularClasspathForkConfiguration.java|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java]


The forked JVM does not start via MANIFEST.MF in booter Jar. Instead it starts 
surefire args file with Jigsaw attributes in TEMP. Is it this you want to have 
described in documentation?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2018-10-26 Thread Robert Scholte (JIRA)


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

Robert Scholte commented on SUREFIRE-1262:
--

This topic would require some extra documentation, but in the end it works just 
like the maven-compiler-plugin: if there's a module-descriptor it'll put all 
required modules on the modulepath and the plugin will add some arguments for 
you to prevent the split-package issue.
Key word is "modle-descriptor". If you run the test with debug-logging you will 
see how tests are executed, including the modulepath and classpath.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2018-10-26 Thread Andrea Aime (JIRA)


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

Andrea Aime commented on SUREFIRE-1262:
---

Hi, I'm trying to understand how does one set up dependencies either in the 
modulepath and in the classpath (I'd need to do a mix, some in one, others in 
the other) but in the documentation of the "test" goal I don't see anything 
related to modulepath. Maybe I'm misunderstanding what this ticket was about, 
or it's just there and I'm missing it?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
>Priority: Major
> Fix For: 2.21.0
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2018-01-13 Thread Hudson (JIRA)

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

Hudson commented on SUREFIRE-1262:
--

ABORTED: Integrated in Jenkins build maven-surefire-dev #103 (See 
[https://builds.apache.org/job/maven-surefire-dev/103/])
[SUREFIRE-1262] Add modulepath support (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=f337881ff7f47ab35669d9c499213f5a6b9a4d8b])
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/InPluginVMSurefireStarter.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
* (edit) pom.xml
* (edit) 
maven-surefire-plugin/src/test/java/org/apache/maven/plugin/surefire/SurefirePluginTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ServiceLoader.java
* (edit) 
surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspath.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspathConfiguration.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
* (add) 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ModulePathIT.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
* (add) surefire-integration-tests/src/test/resources/modulepath/pom.xml
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
* (edit) 
surefire-api/src/test/java/org/apache/maven/surefire/util/ScanResultTest.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/AbstractPathConfiguration.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/module-info.java
* (add) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
* (edit) 
surefire-api/src/main/java/org/apache/maven/surefire/util/DefaultScanResult.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
* (edit) maven-surefire-common/pom.xml
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/com/app/Main.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
added unit test and jsr305 @Nonnull/@Nullable for SUREFIRE-1262 (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=c594ac4c4278e109e2937d2581efc363d7002f75])
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (add) 

[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-12-02 Thread Hudson (JIRA)

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

Hudson commented on SUREFIRE-1262:
--

SUCCESS: Integrated in Jenkins build maven-surefire #1806 (See 
[https://builds.apache.org/job/maven-surefire/1806/])
NULL not allowed in unit tests due to jsr305 @Nonnull for SUREFIRE-1262 
(tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=81b9bbbeea702b1186142559e59bdd5267cc056b])
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfigurationTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-22 Thread Hudson (JIRA)

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

Hudson commented on SUREFIRE-1262:
--

SUCCESS: Integrated in Jenkins build maven-surefire #1804 (See 
[https://builds.apache.org/job/maven-surefire/1804/])
added unit test and jsr305 @Nonnull/@Nullable for SUREFIRE-1262 (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=c594ac4c4278e109e2937d2581efc363d7002f75])
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspathConfiguration.java
* (edit) surefire-booter/pom.xml
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/ProviderInfo.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
* (add) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfigurationTest.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireDependencyResolver.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/AbstractPathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
* (edit) pom.xml
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspath.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~novanic]
It would be an overhead to do the release and a messy in Maven Central what 
features are discontinued and again continued.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Sven Strohschein (JIRA)

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

Sven Strohschein commented on SUREFIRE-1262:


Thank you for the explanation, seems difficult and that it will take a while. 
Is it possible to down-merge this fix (SUREFIRE-1262) to 2.19.x? Then we would 
have a version that is compatible with JUnit 5, Java 9 and which supports the 
JPMS (module-info including Java 9 services).

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~novanic]
Please understand that JUnit 5 has to adapt to our API. I know the JUnit team 
and I would say the team does not want to support surefire provider in their 
code base, but be sure that our team will take over the code from JUnit 5 team 
and we will do so!
The question is only time but will happen after we fix two issues regarding 
sporadically killed forked JVM and then we would proceed with version 2.22.0 
which will include only JUnit 5 Surefire provider but this cannot be done 
tomorrow unfortunately.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Sven Strohschein (JIRA)

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

Sven Strohschein commented on SUREFIRE-1262:


Ok, It seems nobody has get surefire 2.20 and beyond get working together with 
JUnit 5, so I have to wait until the JUnit 5 problem is fixed (or should I now 
immediately join the JUnit 5 team to fix that bug? ;-)). Maybe I could test the 
surefire snapshot version in combination with JUnit 4.12.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Sven Strohschein (JIRA)

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

Sven Strohschein commented on SUREFIRE-1262:


Ok, I tried to test with 2.21.0-20171119.101941-51, but now I'm facing a 
problem which I already had with 2.20 (so I had to stay on 2.19.1). It is this 
issue / incompatibility with JUnit 5: 
https://github.com/junit-team/junit5/issues/809

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Sven Strohschein (JIRA)

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

Sven Strohschein commented on SUREFIRE-1262:


Hi, of course I can and will test it and provide feedback, that is why I asked 
for the nightly/snapshot version. But: I can not actively support the 
development of all open source projects I'm using in my free time. ;-) And I 
think the ASF is not the financial neediest foundation and gets already a lot 
of support. In the end I'm just not satisfied with the priorization, not with 
the developers or software itself.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on SUREFIRE-1262:
--

Hi [~novanic], it seems like you underestimate the consequences of using open 
source projects, the complexity of both surefire and Java9 and the available 
resources that maintain this project. If this is a blocking issue, it would 
have been great to step up and fix it together with us the first time you hit 
it.
Though you can still help by verifying+confirming this issue is indeed fixed. 
You can use the following snapshot repository: 
https://repository.apache.org/content/groups/snapshots/

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Sven Strohschein (JIRA)

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

Sven Strohschein commented on SUREFIRE-1262:


Hi,

could you please tell me when the fix / version 2.21.0 will be released or 
where can I find a nightly/snapshot version? At the moment no Maven project can 
use Java 9 services ("provides ... with ..." within the module-info file), 
because the module-path has to be used instead of the class-path, so tests are 
not finding/loading the service implementations... and there seem to be no 
alternative to surefire. I had expected this is ready before the release of 
Java 9 (early access versions were a long time ago available).

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-19 Thread Hudson (JIRA)

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

Hudson commented on SUREFIRE-1262:
--

SUCCESS: Integrated in Jenkins build maven-surefire #1802 (See 
[https://builds.apache.org/job/maven-surefire/1802/])
[SUREFIRE-1262] Add modulepath support (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=f337881ff7f47ab35669d9c499213f5a6b9a4d8b])
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
* (add) 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ModulePathIT.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
* (add) surefire-integration-tests/src/test/resources/modulepath/pom.xml
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
* (edit) 
surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/InPluginVMSurefireStarter.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspathConfiguration.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/module-info.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
* (edit) 
surefire-api/src/main/java/org/apache/maven/surefire/util/DefaultScanResult.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/AbstractPathConfiguration.java
* (edit) 
surefire-api/src/test/java/org/apache/maven/surefire/util/ScanResultTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ServiceLoader.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
* (edit) maven-surefire-common/pom.xml
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/com/app/Main.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspath.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
* (edit) pom.xml
* (add) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
* (edit) 
maven-surefire-plugin/src/test/java/org/apache/maven/plugin/surefire/SurefirePluginTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.21.0.Jigsaw
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add 

[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-18 Thread Hudson (JIRA)

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

Hudson commented on SUREFIRE-1262:
--

SUCCESS: Integrated in Jenkins build maven-surefire-dev #91 (See 
[https://builds.apache.org/job/maven-surefire-dev/91/])
[SUREFIRE-1262] Add modulepath support (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=f337881ff7f47ab35669d9c499213f5a6b9a4d8b])
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
* (add) 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ModulePathIT.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/module-info.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspath.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
* (edit) 
maven-surefire-plugin/src/test/java/org/apache/maven/plugin/surefire/SurefirePluginTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
* (edit) pom.xml
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
* (edit) 
surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
* (edit) 
surefire-api/src/test/java/org/apache/maven/surefire/util/ScanResultTest.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/AbstractPathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/com/app/Main.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
* (add) surefire-integration-tests/src/test/resources/modulepath/pom.xml
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/InPluginVMSurefireStarter.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java
* (edit) 
surefire-api/src/main/java/org/apache/maven/surefire/util/DefaultScanResult.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
* (add) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ServiceLoader.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
* (edit) maven-surefire-common/pom.xml
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspathConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add 

[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-11-16 Thread Hudson (JIRA)

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

Hudson commented on SUREFIRE-1262:
--

SUCCESS: Integrated in Jenkins build maven-surefire-dev #86 (See 
[https://builds.apache.org/job/maven-surefire-dev/86/])
[SUREFIRE-1262] Add modulepath support (tibor17: 
[http://git-wip-us.apache.org/repos/asf/?p=maven-surefire.git=commit=29621dd06d00ed6d946390446ea8d2a3c04bb0c5])
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
* (add) 
surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ModulePathIT.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/module-info.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ClasspathForkConfiguration.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspath.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
* (edit) pom.xml
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/Classpath.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/AbstractPathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
* (edit) 
surefire-api/src/main/java/org/apache/maven/surefire/util/DefaultScanResult.java
* (add) surefire-integration-tests/src/test/resources/modulepath/pom.xml
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoTest.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/main/java/com/app/Main.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/InPluginVMSurefireStarter.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
* (edit) 
surefire-api/src/test/java/org/apache/maven/surefire/util/ScanResultTest.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/AbstractClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/Platform.java
* (add) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ModularClasspathForkConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
* (add) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ModularClasspathConfiguration.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/surefire/providerapi/ServiceLoader.java
* (edit) 
maven-surefire-plugin/src/test/java/org/apache/maven/plugin/surefire/SurefirePluginTest.java
* (edit) 
surefire-booter/src/test/java/org/apache/maven/surefire/booter/SystemUtilsTest.java
* (add) 
surefire-integration-tests/src/test/resources/modulepath/src/test/java/com/app/AppTest.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkConfigurationTest.java
* (edit) 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
* (edit) 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
* (edit) 
maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
* (edit) maven-surefire-common/pom.xml


> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> 

[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-10-21 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


I have several TODOs with unit tests. JaCoCo curve got worse suddenly.

On Sat, Oct 21, 2017 at 1:49 PM, Robert Scholte (JIRA) 



> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-10-21 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on SUREFIRE-1262:
--

[~tibor17], I think this is looking good and ready to be merged.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2017-10-14 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
I have finished refactoring [1] and the IT test {{ModulePathIT}} passed 
successfully.
Let's wait for Jenkins build and then I can patch master with this change from 
the branch.
https://git1-us-west.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=a72e152a7be7df06a379e92feafa6158bf1f1dab

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{--patch-module 
> target/test-classes}} (was: -Xpatch) which makes it possible to use the same 
> packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-09-18 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
I am removing it from release Version {{2.19.2}} as there can be a nice bunch 
of questions around Java 9 compatibility.
As for instance reworking CLI, executing in-plugin process, 
additional-classpath and modules inside, extracting additional JAR files and 
filtering tests only for appropriate java9 module, scanning module within 
{{target/test-classes}}, configuring selected modules via Mojo parameter, 
combining modules in {{-Dtest= patterns}}, Test List Processor planned in 
Version {{3.0}}.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: Backlog
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-09-17 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
Hi Robert,

Here is specification for {{--patch-module}} http://openjdk.java.net/jeps/261.
The syntax is {{--patch-module =()*}}.
Can you tell me what {{}} module name should be used. I want to run a 
test. How {{module-info.java}} should look like? 

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-24 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on SUREFIRE-1262:
--

Hi Tibor,

It seems the have renamed the argument, see "java -X".
Now it is called --patch-module
I would also suggest to use download and unpack  
https://jdk9.java.net/jigsaw/, it has the advantage that your default java  
version is not upgraded to this early access release.

thanks,
Robert


On Tue, 23 Aug 2016 23:22:20 +0200, Tibor Digana (JIRA)   



> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-23 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
Yesterday I downloaded JDK9 from OpenJDK and installed it.
I have implemented a temporary fix but the property is unrecognized:
Forking command line: cmd.exe /X /C ""D:\Program Files\Java\jdk-9\bin\java" 
-Xpatch D:\vcs\zmaz6/target/test-classes -jar D:...
Unrecognized option: -Xpatch
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-22 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on SUREFIRE-1262:
--

AFAIK this option has always been there.
Just installed Java 1.5, got this output:
{noformat}
>"c:\Program Files (x86)\Java\jdk1.5.0_15\bin\java.exe" -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
{noformat}
m-javadoc-p has a unittest for this to detect all kinds of output from 
different vendors

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-22 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


Is the first line returned by {{java -version}} under Java Spec (don't mean 
only OpenJDK 9) since of Java 1.5 ?
How about other JRE vendors are handling this command?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-22 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on SUREFIRE-1262:
--

Toolchain doesn't detect the java version, it simply picks the one selected. 
In case of non-fork I would check the existence of 
[java.lang.reflect.Module|http://cr.openjdk.java.net/~mr/jigsaw/spec/api/java/lang/reflect/Module.html].
 For forked you need to call {{java -version}} and read the first line, analyze 
its value based on http://openjdk.java.net/jeps/223

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-22 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
How can I determine the java version using toolchain or maven-sahred-utils?
I would call {{OutputStreamFlushableCommandline#createArg().setLine}} if JDK 9 
presents.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-14 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on SUREFIRE-1262:
--

Forked VM would already be a good start, so maybe this issue should be splitted 
into 2 improvements. I'm not sure it there's a solution or the 
IsolatedClassloader. If it is possible, we probably need to use a 
[Layer|http://cr.openjdk.java.net/~mr/jigsaw/spec/api/java/lang/reflect/Layer.html].
 There's an example on the javadoc page. #defineModulesWithOneLoader won't work 
because of the package overlap, but #defineModulesWithManyLoaders seems fine.
It is probably a matter trying several options and having contact with the 
Jigsaw team. I can help you with the latter.

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SUREFIRE-1262) Add modulepath support

2016-08-14 Thread Tibor Digana (JIRA)

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

Tibor Digana commented on SUREFIRE-1262:


[~rfscholte]
{{-Xpatch target/test-classes}} would be for the forked VM. What to change in 
IsolatedCL in case the tests run in Maven process?

> Add modulepath support
> --
>
> Key: SUREFIRE-1262
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1262
> Project: Maven Surefire
>  Issue Type: Improvement
>Reporter: Robert Scholte
>
> With the Jigsaw project Java9 is extended with a modulepath. This means that 
> surefire should be executed in a different way.
> When working with a modulepath, the Classpath in the MANIFEST of the 
> executable jar will be ignored, you need need to add everything on 
> commandline. 
> Just like javadoc, the java executable has an {{@}} option, where you 
> can add arguments per line. So this is the new preferred way to build the 
> module-path.
> IIUC for surefire it is important to add {{-Xpatch target/test-classes}} 
> which makes it possible to use the same packages as target/classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)