Skip to content

Commit f238bb1

Browse files
committed
Add missing Export-Package to mcp-json-jackson2 and mcp-json-jackson3
The bnd configs for mcp-json-jackson2 and mcp-json-jackson3 are missing Export-Package, unlike mcp-core which correctly exports its packages. Without Export-Package, all packages are sealed as bundle-private, causing 'Access restriction' errors for consumers that use Require-Bundle (e.g. Eclipse PDE / Tycho projects). This was introduced in modelcontextprotocol#779 which added OSGi Declarative Services support for modelcontextprotocol#562. The DS service registration works without exports (SCR instantiates classes internally), but direct instantiation such as 'new JacksonMcpJsonMapperSupplier()' from another bundle requires the packages to be exported. Add the same Export-Package directive used in mcp-core.
1 parent 46bacda commit f238bb1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mcp-json-jackson2/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
Import-Package: io.modelcontextprotocol.json,io.modelcontextprotocol.json.schema, \
4141
*;
4242
Service-Component: OSGI-INF/io.modelcontextprotocol.json.jackson2.JacksonMcpJsonMapperSupplier.xml,OSGI-INF/io.modelcontextprotocol.json.schema.jackson2.JacksonJsonSchemaValidatorSupplier.xml
43+
Export-Package: io.modelcontextprotocol.*;version="${project.version}";-noimport:=true
4344
-noimportjava: true;
4445
-nouses: true;
4546
-removeheaders: Private-Package

mcp-json-jackson3/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
Import-Package: io.modelcontextprotocol.json,io.modelcontextprotocol.json.schema, \
4141
*;
4242
Service-Component: OSGI-INF/io.modelcontextprotocol.json.jackson3.JacksonMcpJsonMapperSupplier.xml,OSGI-INF/io.modelcontextprotocol.json.schema.jackson3.JacksonJsonSchemaValidatorSupplier.xml
43+
Export-Package: io.modelcontextprotocol.*;version="${project.version}";-noimport:=true
4344
-noimportjava: true;
4445
-nouses: true;
4546
-removeheaders: Private-Package

0 commit comments

Comments
 (0)