Skip to content

Conversation

@themaherkhalil
Copy link

Currently the jar's automatic module name is invalid as it contains a - in the artifactId. If you run:

➜  0.17.0 jar --describe-module --file mcp-core-0.17.0.jar
Unable to derive module descriptor for: mcp-core-0.17.0.jar
Automatic-Module-Name: io.modelcontextprotocol.sdk.mcp-core: Invalid module name: 'mcp-core' is not a Java identifier

This prevents other projects using modules to import the jar.

The change is to replace the - with a .

After compiling the code to build the jar, running the command will produce:

➜  target git:(main) jar --describe-module --file mcp-core-0.18.0-SNAPSHOT.jar
No module descriptor found. Derived automatic module.

io.modelcontextprotocol.sdk.mcp.core@0.18.0-SNAPSHOT automatic
requires java.base mandated
contains io.modelcontextprotocol.client
contains io.modelcontextprotocol.client.transport
contains io.modelcontextprotocol.client.transport.customizer
contains io.modelcontextprotocol.common
contains io.modelcontextprotocol.json
contains io.modelcontextprotocol.json.schema
contains io.modelcontextprotocol.server
contains io.modelcontextprotocol.server.transport
contains io.modelcontextprotocol.spec
contains io.modelcontextprotocol.util

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.

1 participant