Fix Automatic-Module-Name without hypens
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
This commit is contained in:
parent
4186ca13d1
commit
183935bf80
2 changed files with 76 additions and 3 deletions
24
mcp/pom.xml
24
mcp/pom.xml
|
|
@ -20,6 +20,30 @@
|
|||
<developerConnection>scm:git:ssh://git@github.com/modelcontextprotocol/java-sdk.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<module.name>io.modelcontextprotocol.sdk.mcp</module.name>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- module-info.java refers to the sibling modules by their JPMS names, and
|
||||
those only exist once the siblings have been packaged as jars: before
|
||||
the package phase the reactor hands the compiler bare target/classes
|
||||
directories, which cannot be automatic modules. Compiling at
|
||||
prepare-package keeps `mvn test` working on the full reactor. -->
|
||||
<execution>
|
||||
<id>java-compile</id>
|
||||
<phase>prepare-package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
25
mcp/src/main/java/module-info.java
Normal file
25
mcp/src/main/java/module-info.java
Normal file
|
|
@ -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;
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue