From f63bb213e91ac3a227ccdc80644720170fd8b040 Mon Sep 17 00:00:00 2001 From: Vasily Pelikh <2010720+vpelikh@users.noreply.github.com> Date: Fri, 21 Aug 2026 13:25:16 +0300 Subject: [PATCH] Drop unconditional osgi.cdi extender requirement from OSGi manifests The bnd -cdiannotations directive was set to '*' during the Jakarta migration, which makes bnd's CDIAnnotations plugin scan every class and unconditionally add a mandatory 'Require-Capability: osgi.extender; ...osgi.cdi' to the generated manifest of every bnd-processed module, including swagger-jakarta-rest. Because the requirement is mandatory, any non-CDI OSGi runtime that drives the OpenAPI Reader programmatically (e.g. via Declarative Services) fails to resolve the bundle, even though CDI is never used. Revert -cdiannotations to the empty value used upstream so no CDI extender requirement is generated. Runtime CDI autodiscovery is driven by META-INF/beans.xml + the CDI PortableExtension and is unaffected; CDIAutodiscoveryTest still passes. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3655f0c173..e8723b5d30 100644 --- a/pom.xml +++ b/pom.xml @@ -229,7 +229,7 @@ -define-contract: \ osgi.contract;osgi.contract=JavaJAXRS;version:List="4.0";uses:="jakarta.ws.rs,jakarta.ws.rs.core,jakarta.ws.rs.ext,jakarta.ws.rs.client,jakarta.ws.rs.container",\ osgi.contract;osgi.contract=JavaServlet;version:List="6.0";uses:="jakarta.servlet,jakarta.servlet.annotation,jakarta.servlet.descriptor,jakarta.servlet.http" - -cdiannotations: * + -cdiannotations: ]]>