fix: use valid JPMS module name for mcp-core #609
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #560
Automatic-Module-Name
inmcp-core/pom.xml
to use a valid JPMS module nameio.modelcontextprotocol.sdk.mcp-core
(invalid - contains dash) toio.modelcontextprotocol.sdk.mcp.core
Bundle-SymbolicName
kept asio.modelcontextprotocol.sdk.mcp-core
for backward compatibilityProblem
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
toio.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
mcp-core
module successfullyAutomatic-Module-Name: io.modelcontextprotocol.sdk.mcp.core
Bundle-SymbolicName
remainsio.modelcontextprotocol.sdk.mcp-core
🤖 Generated with Claude Code