I used Maven 4 as much as possible over the past year; it was the
default/global version on my machine.

But I ran into an issue when publishing artifacts to Central using the
Central Maven Publishing Plugin. So I downgraded this project to Maven 3
using the Maven wrapper.
---

Regards,

*Hantsy Bai*

Self-employed consultant, fullstack developer, agile coach,
freelancer/remote worker

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsy


On Sat, Sep 26, 2026 at 5:46 PM Martin Desruisseaux via users <
[email protected]> wrote:

> 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]
>
>

Reply via email to