Hi Martin, Thank you for your thoughtful comments.
I suppose it feels like Java is still being developed in an ivory tower away from the real world. The constant reinventing the wheel (logging and http client APIs are obvious examples). I suppose OSGi vs. JPMS could fall into this category. All of this to say that I wish existing tooling like Maven had been taken into account or have been brought in for collaboration such that JPMS and Maven could have been in lockstep. We probably didn't have the resources on the Apache side for that I imagine. Gary On Tue, Apr 1, 2025, 09:55 Martin Desruisseaux < martin.desruisse...@geomatys.com> wrote: > Le 2025-04-01 à 08 h 37, Gary Gregory a écrit : > > > What Piotr describes is sadly the kind of insane setup one must have > > to work with JPMS and keeps me saying JPMS is something to work > > around, not work with. > I think that what Piotr described is a Maven issue, not a JPMS issue. > The problem is that Maven 3 sometime setups JPMS in awkward ways. For > example, when testing a project with a module-info.java in the test > sources, Maven 3 declares `src/test/java` as the main code and > `src/main/java` as the patch applied over the tests. It is not > surprising that we observe weird behavior, and not really fair to blame > JPMS for that. > > > > What I really want is a --jpms-off toolchain switch... > I think that this switch already exists is some way: put everything on > the classpath. However, we have few control in Maven 3 about where to > place dependencies. But again, this is a Maven 3 problem, not a JPMS > problem. It should be resolved in Maven 4: a developer can declare all > dependencies with `<type>classpath-jar</type>` if this is really wanted. > > Note, however, that if a library is modular by design, it may not work > at all on the classpath. For example, the library may declare its > services in module-info only, without copy in `META-INF/services`. Or it > may depend on `java.lang.ModuleLayer`. No --jpms-off switch will "fix" > that. > > Martin > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >