[ 
https://issues.apache.org/jira/browse/SUREFIRE-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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 {{@<file>}} 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)

Reply via email to