[
https://issues.apache.org/jira/browse/TIKA-4700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18068341#comment-18068341
]
Konrad Windszus edited comment on TIKA-4700 at 3/25/26 4:11 PM:
----------------------------------------------------------------
The according Manifest headers can be automatically generated with
https://bnd.bndtools.org/instructions/metainf_services.html. In order to not
rely on Bnd annotations one can just extend the generated
{{META-INF/services/...}} as outlined in
https://bnd.bndtools.org/chapters/230-manifest-annotations.html#meta-infservices-annotations.
That way just using the already existing Tika annotation
https://github.com/apache/tika/blob/main/tika-annotation-processor/src/main/java/org/apache/tika/config/TikaComponent.java
is enough. Compare also with
https://bnd.discourse.group/t/automate-meta-inf-services-chores/397.
was (Author: kwin):
The according Manifest headers can be automatically generated with
https://bnd.bndtools.org/instructions/metainf_services.html. In order to not
rely on Bnd annotations one can just extend the generated
{{META-INF/services/...}} as outlined in
https://bnd.bndtools.org/chapters/230-manifest-annotations.html#meta-infservices-annotations.
That way just using the already existing Tika annotation
https://github.com/apache/tika/blob/main/tika-annotation-processor/src/main/java/org/apache/tika/config/TikaComponent.java
is enough.
> Support OSGi Service Loader Mediator Spec
> -----------------------------------------
>
> Key: TIKA-4700
> URL: https://issues.apache.org/jira/browse/TIKA-4700
> Project: Tika
> Issue Type: Improvement
> Reporter: Konrad Windszus
> Priority: Major
>
> The [Java Service
> Loader|https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html]
> is not properly supported in OSGi cross bundle boundaries due to Classloader
> visibility restrictions. In order to circumvent this limitation the [OSGi
> Service Loader Mediator
> Specification|https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.loader.html]
> defines certain {{Capabilities}} which are used to set up a registry where
> all bundles have access to providers (no matter from which bundles).
> This mechanism is just relying on additional Manifest headers which don't
> impact usability of those JARs outside OSGi.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)