Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Fwd: Status of JPMS support in compiler plugin

Discussions for m2e take place here:

https://github.com/eclipse-m2e/m2e-core/discussions

so you better start a thread there. Currently I'm not aware of any plans or efforts in that direction, but contributions are always welcome.

In the past there where some attempts to better support JPMS but sadly not much support form the users actually wanting it.

Am 31.03.25 um 23:32 schrieb Daniel Schmid via m2e-dev:
Dear members of the m2e-dev mailing list,

It seems like Maven converged to a new model of supporting projects with JPMS modules.

Are there are plans or discussion on implementing that into m2e once it is in Maven (or maybe even start with that before)?

Yours,
Daniel

Hello all


JPMS support in the compiler plugin (not yet merged) has reached a point where it can be used on some real projects. The Maven 3 way to make a modular project is still supported, but the proposed alternative for better use of JPMS is described here:

* https://github.com/Geomatys/maven-compiler-plugin/wiki/User- guide#modular-project * https://github.com/Geomatys/maven-compiler-plugin/wiki/ Migration#modular-projects

Note that the module source hierarchy described in above link is not an invention of this compiler plugin work. It come from javac [1]. The new plugin does not force anyone to adopt that organization, but makes possible to use it for those who want. In the same way, the additional directory that appears in the output classes also come from javac. It appears when we use the `--module-source-path` option instead of `-- source-path`. Again, this is an opt-in: by default, the plugin behaves as in Maven 3. But if the sources are declared in the way suggested in above links, then the differences documented above appear.

The pull request has not been created yet. This email is for giving a chance to anyone to comment before to go further. Note that the work is not finished. Some remaining tasks are:

* Support modular + multi-release projects (currently, it is one or
the other but not both).
* Provide a substitute to the overriding of `module-info.java` in
tests when the developer needs something more advanced than the
--patch-module and --add-reads options automatically added by the
compiler. In the meantime, developers can workaround with
|<testCompilerArgs>| plugin configuration.

Martin

[1]https://docs.oracle.com/en/java/javase/24/docs/specs/man/ javac.html#module-source-hierarchy

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/ listinfo/m2e-dev



Back to the top