diff --git a/conformance-tests/client-jdk-http-client/pom.xml b/conformance-tests/client-jdk-http-client/pom.xml index de2075ace..1d111dde2 100644 --- a/conformance-tests/client-jdk-http-client/pom.xml +++ b/conformance-tests/client-jdk-http-client/pom.xml @@ -21,6 +21,7 @@ + io.modelcontextprotocol.sdk.conformance.client.jdk true diff --git a/conformance-tests/client-spring-http-client/pom.xml b/conformance-tests/client-spring-http-client/pom.xml index 8bc74cc41..ccc721c1f 100644 --- a/conformance-tests/client-spring-http-client/pom.xml +++ b/conformance-tests/client-spring-http-client/pom.xml @@ -21,6 +21,7 @@ + io.modelcontextprotocol.sdk.conformance.client.spring 17 4.1.0 2.0.0 diff --git a/conformance-tests/server-servlet/pom.xml b/conformance-tests/server-servlet/pom.xml index cc8ebc364..ce8f558e6 100644 --- a/conformance-tests/server-servlet/pom.xml +++ b/conformance-tests/server-servlet/pom.xml @@ -21,6 +21,7 @@ + io.modelcontextprotocol.sdk.conformance.server.servlet true diff --git a/mcp-core/pom.xml b/mcp-core/pom.xml index 20ebc75bf..79a417b69 100644 --- a/mcp-core/pom.xml +++ b/mcp-core/pom.xml @@ -20,6 +20,10 @@ scm:git:ssh://git@github.com/modelcontextprotocol/java-sdk.git + + io.modelcontextprotocol.sdk.mcp.core + + @@ -37,7 +41,7 @@ Bundle-Name: Bundle ${project.groupId} : ${project.artifactId} Bundle-SymbolicName: ${project.groupId}.${project.artifactId} Bundle-Version: ${project.version} - Automatic-Module-Name: ${project.groupId}.${project.artifactId} + Automatic-Module-Name: ${module.name} Import-Package: jakarta.*;resolution:=optional, \ *; Service-Component: OSGI-INF/io.modelcontextprotocol.json.McpJsonDefaults.xml diff --git a/mcp-json-jackson2/pom.xml b/mcp-json-jackson2/pom.xml index ba10adeb4..5ccb32e9d 100644 --- a/mcp-json-jackson2/pom.xml +++ b/mcp-json-jackson2/pom.xml @@ -20,6 +20,10 @@ scm:git:ssh://git@github.com/modelcontextprotocol/java-sdk.git + + io.modelcontextprotocol.sdk.mcp.json.jackson2 + + @@ -37,7 +41,7 @@ Bundle-Name: Bundle ${project.groupId} : ${project.artifactId} Bundle-SymbolicName: ${project.groupId}.${project.artifactId} Bundle-Version: ${project.version} - Automatic-Module-Name: ${project.groupId}.${project.artifactId} + Automatic-Module-Name: ${module.name} Bundle-ActivationPolicy: lazy Import-Package: io.modelcontextprotocol.json,io.modelcontextprotocol.json.schema, \ *; diff --git a/mcp-json-jackson3/pom.xml b/mcp-json-jackson3/pom.xml index 50d4f230a..98ba82bab 100644 --- a/mcp-json-jackson3/pom.xml +++ b/mcp-json-jackson3/pom.xml @@ -20,6 +20,10 @@ scm:git:ssh://git@github.com/modelcontextprotocol/java-sdk.git + + io.modelcontextprotocol.sdk.mcp.json.jackson3 + + @@ -37,7 +41,7 @@ Bundle-Name: Bundle ${project.groupId} : ${project.artifactId} Bundle-SymbolicName: ${project.groupId}.${project.artifactId} Bundle-Version: ${project.version} - Automatic-Module-Name: ${project.groupId}.${project.artifactId} + Automatic-Module-Name: ${module.name} Bundle-ActivationPolicy: lazy Import-Package: io.modelcontextprotocol.json,io.modelcontextprotocol.json.schema, \ *; diff --git a/mcp-test/pom.xml b/mcp-test/pom.xml index 0322bf476..6002b84ae 100644 --- a/mcp-test/pom.xml +++ b/mcp-test/pom.xml @@ -20,6 +20,10 @@ scm:git:ssh://git@github.com/modelcontextprotocol/java-sdk.git + + io.modelcontextprotocol.sdk.mcp.test + + io.modelcontextprotocol.sdk diff --git a/mcp/pom.xml b/mcp/pom.xml index 790a100e4..5ae1301ae 100644 --- a/mcp/pom.xml +++ b/mcp/pom.xml @@ -20,6 +20,30 @@ scm:git:ssh://git@github.com/modelcontextprotocol/java-sdk.git + + io.modelcontextprotocol.sdk.mcp + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + java-compile + prepare-package + + + + + + diff --git a/mcp/src/main/java/module-info.java b/mcp/src/main/java/module-info.java new file mode 100644 index 000000000..51c6891b1 --- /dev/null +++ b/mcp/src/main/java/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2026 - 2026 the original author or authors. + */ + +/** + * Aggregator module for the Java MCP SDK. Carries no code of its own; it exists so that + * consumers can depend on the SDK with a single {@code requires} directive. + */ +module io.modelcontextprotocol.sdk.mcp { + + requires transitive io.modelcontextprotocol.sdk.mcp.core; + + requires transitive io.modelcontextprotocol.sdk.mcp.json.jackson3; + + // mcp-core and mcp-json-jackson3 are automatic modules, so they cannot pull their + // own dependencies into the module graph. Requiring them here spares consumers from + // having to repeat these declarations. Drop this block once the SDK modules carry + // their own module descriptors. + requires org.slf4j; + + requires tools.jackson.databind; + + requires com.networknt.schema; + +} diff --git a/pom.xml b/pom.xml index f1ef7574e..bdf0db889 100644 --- a/pom.xml +++ b/pom.xml @@ -59,6 +59,10 @@ 17 + + + 3.27.6 6.0.2 5.20.0 @@ -207,6 +211,7 @@ ${project.artifactId} ${project.version} + ${module.name}