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