-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
Derive serviceloader capabilities and requirements from hand-crafted services files #5903
Comments
No problem with this functionality, will you provide a PR? |
It might be an idea to bring the ServiceProvider/ServiceConsumer in the realm of OSGi. This tends to ease the anxiety. |
Great. I can give it a try, but I have to admit it is not the No.1 on my priority list.
Yes that will probably already help. |
I am taking a look at it, so wait a bit. |
It is possible to add addnotions in the comments of the service files of the Service Loader. Fixes bndtools#5903 --- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
BND can derive the OSGi requirements and capabilities necessary for the OSGi service loader mediator specification leveraging BND's
@Provider
annotation. These annotations have retention policy CLASS and only require a compile-time dependency tobiz.aQute.bnd:biz.aQute.bnd.annotation
.Nevertheless from my experience projects that are not familiar with OSGi but are asked to add OSGi metadata (e.g. by using the bnd-maven-plugin) are often reluctant to add these, for them, 'random/foreign/unknown' annotations to their code base.
At the same projects that provide services often already manually maintain their service descriptor files.
BND can also generate this file, but at the same time this file provides the most important information about service providers.
Therefore it would be quite convenient if bnd would consider an existing service descriptor file as an (optional alternative) source to gather service providers.
At the moment the necessary requirements and capabilities are maintained explicitly as bnd-instructions as a work-around in such cases.
The text was updated successfully, but these errors were encountered: