Fwd: Force JPMS to add module to boot layer

Christian Stein sormuras at gmail.com
Tue Jun 23 17:56:18 UTC 2020


On Sun, Jun 21, 2020 at 8:55 PM Alex Orlov <ooo_saturn7 at mail.ru> wrote:

>
> Hi all,
>
> New version of maven-failsafe-plugin (3.0.0-M5) has been released and now
> it is possible to have two module-info in one
> project — one in src/main/java and one in src/test/java  and to test
> modules on module -path.
> [...]


Support for the Java module system was included in Maven
Surefire/Failsafe (SF/FS) recently. As you noted, in version 3.0.0-M5.
There are for sure some short-comings, missing features,
and also plain bugs in the implementation of SF/FS. See this
recent discussion as an example: [1733] You're very welcome
to test-drive and propose fixes for SF/FS.

Java modules are declared by developers – no build tool can 100%
correctly guess what should be included (exported, opened, ...)
in a Java module. This goes for modules at (Maven) tests alike.
And it surely goes for setting up the module-path and the class-path
at test runtime. I invite you to read [1] and look at this sample
Maven project that show-cases most combinations of "intra-module"
and "extra-modular" testing [2].

 AND I AM SURE EVERYONE WILL AGREE WITH ME.


No.

Cheers,
Christian

PS: Just a blind guess, did you already try to pass

 --add-modules=ALL-MODULE-PATH

to the SF/FS runtime?

1733:
https://issues.apache.org/jira/browse/SUREFIRE-1733?focusedCommentId=17142664&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17142664
1: https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world
<https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html>
2: https://github.com/micromata/sawdust


More information about the jigsaw-dev mailing list