Hi Piotr,
Since JDK 8 is not modular, it simply treats
`module-info.class` as a regular resource.
I was going to ask, why risk a future problem? Couldn't you just
configure BND to place this file under META-INF/versions/9/?
But then I look under
https://repository.apache.org/content/groups/snapshots/org/apache/commons/commons-math4-core/4.0-SNAPSHOT/
and it looks like this is already the case. For the commons-math4-core
artifact, at least, I see META-INF/versions/9/module-info.class.
Have all the other commons-math4 artifacts been updated this way? If so,
we should be done.
Thanks,
Gili
On 2025-08-13 01:02, Piotr P. Karwasz wrote:
Hi Gili,
On 13.08.2025 01:02, Gili Tzabari wrote:
I noticed that you've been improving the modularity of the Commons Math4
library. Can you please add module-info.java to each Maven artifact?
All recent versions of Apache Commons libraries already include a JPMS
descriptor, generated via the *Moditect Maven Plugin* and streamlined
through `commons-parent`.
For Commons Math, this likely just requires a new release. Have you
tried the snapshots available at:
http://repository.apache.org/snapshots
If you want to maintain Java8 support, you will need to use MultiRelease
JARs; otherwise, you can just add the file directly.
That’s the approach we currently use, although Multi-Release JARs aren’t
strictly necessary. For example, the *BND Maven Plugin* takes a
different route by placing the `module-info.class` directly at the root
of the JAR. Since JDK 8 is not modular, it simply treats
`module-info.class` as a regular resource.
Best regards,
Piotr
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org