Skip to content

Commit 562f0d3

Browse files
tzolovclaude
andcommitted
Attach a javadoc jar to the mcp artifact
The mcp module's only source is module-info.java, which maven-javadoc-plugin 3.11.3+ skips ("No Javadoc in project. Archive not created."), so no javadoc jar was produced and Maven Central rejected the 2.2.0-M2 deployment. Package src/main/javadoc as the javadoc jar with maven-jar-plugin instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
1 parent 2de7fa9 commit 562f0d3

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎mcp/pom.xml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@
4141
</execution>
4242
</executions>
4343
</plugin>
44+
<plugin>
45+
<groupId>org.apache.maven.plugins</groupId>
46+
<artifactId>maven-jar-plugin</artifactId>
47+
<executions>
48+
<!-- The only source here is module-info.java, which maven-javadoc-plugin
49+
(3.11.3+) skips, so it creates no javadoc jar. Maven Central requires
50+
one, so package src/main/javadoc as the javadoc jar instead. -->
51+
<execution>
52+
<id>javadoc-jar</id>
53+
<phase>package</phase>
54+
<goals>
55+
<goal>jar</goal>
56+
</goals>
57+
<configuration>
58+
<classifier>javadoc</classifier>
59+
<classesDirectory>${project.basedir}/src/main/javadoc</classesDirectory>
60+
</configuration>
61+
</execution>
62+
</executions>
63+
</plugin>
4464
</plugins>
4565
</build>
4666

‎mcp/src/main/javadoc/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Java MCP SDK
2+
3+
This artifact only aggregates `mcp-core` and `mcp-json-jackson3` and contains no API of its own.
4+
See the javadoc of `io.modelcontextprotocol.sdk:mcp-core` and `io.modelcontextprotocol.sdk:mcp-json-jackson3`.

0 commit comments

Comments
 (0)