User POV here: I find it confusing that I can't tell when people talk about a Maven module versus a JPMS module. My knee jerk reaction is that Maven 3 should deprecate its use of "module" in favor of "project" (including XML tags) and Maven 4 only use "module" only for JPMS.
2c, Gary On Fri, May 16, 2025, 08:58 Martin Desruisseaux < martin.desruisse...@geomatys.com> wrote: > Le 2025-05-16 à 14 h 27, Andy Law a écrit : > > >> The most natural way is to do parent/moduleX/src/main/java (and > siblings) > >> and handle the compiler plugin in parent to be jpms specific, no > technical > >> blocker, no maven core change needed > > > This (^^) just seems so natural, I can’t believe that there is any > discussion about doing it any other way. > > One javac execution would compile many Maven subprojects at once. I > don't think that this is so natural in Maven. Aggregated Javadoc is one > of the few plugins doing that, and I have read in some JIRA or wiki that > this is done with a hack not recommended for other plugins. > > > > And I still don’t understand what the <module> sub-element of the > <source> tag is actually for. > It map directly to the "module-name" part of the `--module-source-path > module-name=directory" compiler option. This option is required for > multi-module compilation. > > From a programmatic point of view, since the plugin uses javax.tools > interface, it maps directly to the "moduleName" argument of the > following method, which is invoked by maven-compiler-plugin 4.0.0-beta-3: > > > https://docs.oracle.com/en/java/javase/24/docs/api/java.compiler/javax/tools/StandardJavaFileManager.html#setLocationForModule(javax.tools.JavaFileManager.Location,java.lang.String,java.util.Collection) > > Martin > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >