Open rmannibucau opened 6 years ago
I wish for this proposal to become a general practice for all MP APIs.
There is a long tradition of Java API repackaging for use in OSGi. This has lead not only to multiple disparate repackaging efforts but to outright forks in some cases (as was the need in Geronimo as shown above, but also in many others.)
The above suggestion uses OSGi specifications which are the culmination of years of analysis and real life use. It is the best way to handle OSGi compatibility and requires little to no code change w.r.t. the API code; specific use of the single argument ServiceLoader.load(String)
is required for Service Loader Mediator to do it's work (SpiFly).
Agreed, we were just following what other MP projects were doing, so we must not have enough in general, or have fallen behind.
@rotty3000 are you able to help and do a PR to fix this one and then we can propose it as a general solution for MP?
I will do that in the coming weeks.
All, I've sent the following PR https://github.com/eclipse/microprofile-jwt-auth/pull/108 (note I've done this for all official microprofile projects). Thoughts welcome.
At geronimo we have a set of OSGi users and to fulfill all their requirements the API jar should support OSGi metadata.
It is mainly about providing the following metadata:
This will allow to avoid to fork the API and expose multiple coordinates for the same jar at the end.
Thanks, Romain