Hello David

The usefulness of multi-modules compilation may be debated, but I don't think that Maven should impose its view on users. Multi-modules is a Java feature that exists, is documented, standardized and officially supported. It does provide some benefits. It may come at the cost of some incompatibilities with existing plugins, but users have the control on the plugins that they use in a pom.xml file for building their projects. They can decide themselves if multi-modules is possible considering the plugins that they use, and if the benefits are worth.

Multi-modules is not incompatible with Multi-Release (MR) JAR file production. The production of MR has already been made much easier (I think) in the Maven compiler plugin 4.0.0-beta-3. This work was a side-effect of the multi-release work. Therefore, even peoples who don't like multi-modules get, indirectly, some benefits of the work for supporting multi-modules. Current the 4.0.0-beta-3 plugin does not yet support the mix of MR and multi-modules (this is currently one or the other), but only because of unfinished work.

If the advantage of multi-modules can be simulated in other ways, these other ways add layers of complexity compared to having a support directly from javac. I presume that they would also not achieve the same level of performance in build execution time.

    Martin


Le 2025-05-15 à 19 h 34, David Lloyd a écrit :

As someone who has been at least somewhat involved with the JPMS since the
beginning, and who has many projects which are modular already, I do not
think that it is necessary, useful, or wise to support multi-module
compilation from Maven or any other build tool. It is incompatible with MR
JAR production (which is far more useful and common in my experience) or
any other kind of layered compilation, and many of the advantages of this
style of compilation can be simulated in other ways. It really feels like
this is something that is being proposed because it's possible, not because
it is useful (or at least, useful enough to justify breaking useful
existing assumptions that a user or plugin developer could make).


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to