I don't remember if I replied to this or not, but anyway the BND author seems to be aware of this issue and his reply was not too promising: https://github.com/bndtools/bnd/issues/5687

Personally, I think you're asking for trouble if you add module-info.class into a different directory than it is expected. There is no guarantee that all implementations will pick it up properly as if violates the specification. The reply by the BND author makes me question whether this is a tool one should use... In any case, Moditect works great as does maven-compiler-plugin's built-in support for multirelease JARs. My suggestion: stick to the spec.

Best of luck,
Gili

That’s a good question. Do you foresee any potential future issues with
BND’s current behavior?

To clarify my earlier message: Apache Commons does *not* use BND to
generate JPMS descriptors: it uses Moditect, which places them in
`META-INF/versions`.

However, other projects (e.g., Log4j) do use BND, and unless I’m
mistaken, BND always places the descriptor at the root of the JAR. If
you identify any problems with this approach, it may be worth opening an
issue with BND [1].

Have all the other commons-math4 artifacts been updated this way? If so,
we should be done.
Since Commons Math is a multi-module Maven project, updating one
artifact means all others should also be updated. However, it’s still
worth double-checking the correctness of the generated descriptors.

There might be some problems related to the `transitive` (which needs to
be set manually) or `static` modifiers.

Piotr

References:
[1] https://github.com/bndtools/bnd

---------------------------------------------------------------------
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

Reply via email to