Skip to content

Conversation

bjorndarri
Copy link

Summary

Fixes #560

  • Fixed Automatic-Module-Name in mcp-core/pom.xml to use a valid JPMS module name
  • Changed from io.modelcontextprotocol.sdk.mcp-core (invalid - contains dash) to io.modelcontextprotocol.sdk.mcp.core
  • OSGI Bundle-SymbolicName kept as io.modelcontextprotocol.sdk.mcp-core for backward compatibility

Problem

JPMS module names must be valid Java identifiers and cannot contain dashes. The previous automatic module name io.modelcontextprotocol.sdk.mcp-core prevented usage in modular Java applications.

Solution

Hard-coded the Automatic-Module-Name to io.modelcontextprotocol.sdk.mcp.core.

Alternative: Could use BND's substitution macro ${subst;${project.groupId}.${project.artifactId};-;.} if dynamic generation is preferred by maintainers.

Compatibility

OSGI's Bundle-SymbolicName remains unchanged with the dash (mcp-core) as OSGI allows dashes in symbolic names. Having different names for JPMS and OSGI is acceptable and common.

Test plan

  • Built mcp-core module successfully
  • Verified manifest contains Automatic-Module-Name: io.modelcontextprotocol.sdk.mcp.core
  • Verified Bundle-SymbolicName remains io.modelcontextprotocol.sdk.mcp-core

🤖 Generated with Claude Code

Changed Automatic-Module-Name from io.modelcontextprotocol.sdk.mcp-core
to io.modelcontextprotocol.sdk.mcp.core. JPMS module names must be valid
Java identifiers and cannot contain dashes. This was preventing usage in
modular Java applications.

The OSGI Bundle-SymbolicName is kept as io.modelcontextprotocol.sdk.mcp-core
(with dash) for backward compatibility, as OSGI allows dashes in symbolic names.

Note: If preferred, the Automatic-Module-Name could use BND's substitution
macro instead: ${subst;${project.groupId}.${project.artifactId};-;.}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid Automatic-Module-Name in mcp-core
1 participant