Skip to content

Commit d9c4818

Browse files
konczdevtzolov
authored andcommitted
Generate OSGi metadata
1 parent 2c500b9 commit d9c4818

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

Diff for: mcp/pom.xml

+44
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,50 @@
2020
<developerConnection>[email protected]/modelcontextprotocol/java-sdk.git</developerConnection>
2121
</scm>
2222

23+
<build>
24+
<plugins>
25+
<plugin>
26+
<groupId>biz.aQute.bnd</groupId>
27+
<artifactId>bnd-maven-plugin</artifactId>
28+
<version>${bnd-maven-plugin.version}</version>
29+
<executions>
30+
<execution>
31+
<id>bnd-process</id>
32+
<goals>
33+
<goal>bnd-process</goal>
34+
</goals>
35+
<configuration>
36+
<bnd><![CDATA[
37+
Bundle-Name: Bundle ${project.groupId} : ${project.artifactId}
38+
version: ${versionmask;===;${version_cleanup;${project.version}}}
39+
Bundle-SymbolicName: ${project.groupId}.${project.artifactId}
40+
Bundle-Version: ${version}
41+
Automatic-Module-Name: ${project.groupId}.${project.artifactId}
42+
Import-Package: jakarta.*;resolution:=optional, \
43+
*;
44+
Export-Package: io.modelcontextprotocol.*;version="${version}";-noimport:=true
45+
-noimportjava: true;
46+
-nouses: true;
47+
-removeheaders: Private-Package
48+
]]>
49+
</bnd>
50+
</configuration>
51+
</execution>
52+
</executions>
53+
</plugin>
54+
55+
<plugin>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-jar-plugin</artifactId>
58+
<configuration>
59+
<archive>
60+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
61+
</archive>
62+
</configuration>
63+
</plugin>
64+
</plugins>
65+
</build>
66+
2367
<dependencies>
2468

2569
<dependency>

Diff for: pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
<tomcat.version>11.0.2</tomcat.version>
9292
<jakarta.servlet.version>6.1.0</jakarta.servlet.version>
9393
<awaitility.version>4.2.0</awaitility.version>
94+
<bnd-maven-plugin.version>7.1.0</bnd-maven-plugin.version>
9495
</properties>
9596

9697
<modules>

0 commit comments

Comments
 (0)