Hello Hantsy
There is a third solution: use the `--patch-module` option, which are
designed for this kind of tasks. These options are tedious to use with
Maven 3, but Maven 4 makes that easier. More info there:
https://maven.apache.org/plugins/maven-compiler-plugin-4.x/module-info-patch.html
We have not yet upgraded the Surefire plugin for using the above, but we
are about to resume this work soon. Therefore, this third solution is
not fully available yet, but it would hopefully not be too long before
it become available. In the meantime, a workaround may be to specify
`--patch-module` manually as a JVM option in Surefire configuration.
Martin
Le 26/09/2026 à 14:11, hantsy bai a écrit :
Hi,
I tried to add JPMS module info to my project:
https://github.com/hantsy/jdbc-client-cdi/,
I ran into a situation where I had to decide how to add the module-info.
Adding module-info to main and test is straightforward, but I have an
issue: the test code has to use a different package name to identify the
module from the main. So if I want to test some package scope classes, it
is becoming a problem.
Another solution from Google is using moditech plugin to generate the
module-info on the fly. Currently, it seems this is better for me.
I am hearing your suggestions.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]