Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSGi metadata to API jar #95

Open
rmannibucau opened this issue Jun 6, 2018 · 5 comments
Open

Add OSGi metadata to API jar #95

rmannibucau opened this issue Jun 6, 2018 · 5 comments
Milestone

Comments

@rmannibucau
Copy link

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:

  1. OSGi java contract (https://www.osgi.org/portable-java-contract-definitions/, example available at apache/geronimo-specs@6718be8#diff-f75c44c910ca254b2b6eb71dee8a14e5R112)
  2. SpiFly metadata (http://aries.apache.org/modules/spi-fly.html, example available at https://github.com/apache/geronimo-specs/pull/6/files#diff-a665df1a7e55370409add2a70e3f10c7R101)

This will allow to avoid to fork the API and expose multiple coordinates for the same jar at the end.

Thanks,
Romain

@rotty3000
Copy link

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

@starksm64 starksm64 added this to the 2.0 milestone Aug 9, 2018
@starksm64
Copy link
Contributor

Agreed, we were just following what other MP projects were doing, so we must not have enough in general, or have fallen behind.

@rmannibucau
Copy link
Author

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

@rotty3000
Copy link

I will do that in the coming weeks.

@rotty3000
Copy link

All, I've sent the following PR #108 (note I've done this for all official microprofile projects). Thoughts welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants