From 2e41351d7f1235234d2ce5352e175f6a781acd07 Mon Sep 17 00:00:00 2001 From: Daniel Garnier-Moiroux Date: Wed, 21 Oct 2026 21:34:25 +0200 Subject: [PATCH 1/5] Bump Maven wrapper to Maven 3.9.16 - Maven 3.9.16 - Maven Wrapper 3.3.4 Stay on Maven 3.9.x, see #1189. Signed-off-by: Daniel Garnier-Moiroux --- .mvn/wrapper/maven-wrapper.properties | 4 +- mvnw | 50 ++++++++++++++++++++---- mvnw.cmd | 56 +++++++++++++++++++++++---- 3 files changed, 93 insertions(+), 17 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index d58dfb70b..c1677b683 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,6 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -wrapperVersion=3.3.2 +wrapperVersion=3.3.4 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip diff --git a/mvnw b/mvnw index 19529ddf8..bd8896bf2 100755 --- a/mvnw +++ b/mvnw @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.2 +# Apache Maven Wrapper startup batch script, version 3.3.4 # # Optional ENV vars # ----------------- @@ -105,14 +105,17 @@ trim() { printf "%s" "${1}" | tr -d '[:space:]' } +scriptDir="$(dirname "$0")" +scriptName="$(basename "$0")" + # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties while IFS="=" read -r key value; do case "${key-}" in distributionUrl) distributionUrl=$(trim "${value-}") ;; distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; esac -done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" +done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" case "${distributionUrl##*/}" in maven-mvnd-*bin.*) @@ -130,7 +133,7 @@ maven-mvnd-*bin.*) distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" ;; maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; esac # apply MVNW_REPOURL and calculate MAVEN_HOME @@ -227,7 +230,7 @@ if [ -n "${distributionSha256Sum-}" ]; then echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 exit 1 elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then distributionSha256Result=true fi elif command -v shasum >/dev/null; then @@ -252,8 +255,41 @@ if command -v unzip >/dev/null; then else tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" fi -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +actualDistributionDir="" + +# First try the expected directory name (for regular distributions) +if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then + if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then + actualDistributionDir="$distributionUrlNameMain" + fi +fi + +# If not found, search for any directory with the Maven executable (for snapshots) +if [ -z "$actualDistributionDir" ]; then + # enable globbing to iterate over items + set +f + for dir in "$TMP_DOWNLOAD_DIR"/*; do + if [ -d "$dir" ]; then + if [ -f "$dir/bin/$MVN_CMD" ]; then + actualDistributionDir="$(basename "$dir")" + break + fi + fi + done + set -f +fi + +if [ -z "$actualDistributionDir" ]; then + verbose "Contents of $TMP_DOWNLOAD_DIR:" + verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" + die "Could not find Maven distribution directory in extracted archive" +fi + +verbose "Found extracted Maven distribution directory: $actualDistributionDir" +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" clean || : exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd index 249bdf382..92450f932 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -19,7 +19,7 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM Apache Maven Wrapper startup batch script, version 3.3.4 @REM @REM Optional ENV vars @REM MVNW_REPOURL - repo url base for downloading maven distribution @@ -40,7 +40,7 @@ @SET __MVNW_ARG0_NAME__= @SET MVNW_USERNAME= @SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) @echo Cannot start maven from wrapper >&2 && exit /b 1 @GOTO :EOF : end batch / begin powershell #> @@ -73,16 +73,30 @@ switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { # apply MVNW_REPOURL and calculate MAVEN_HOME # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" + $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" } $distributionUrlName = $distributionUrl -replace '^.*/','' $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' -$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" + +$MAVEN_M2_PATH = "$HOME/.m2" if ($env:MAVEN_USER_HOME) { - $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" + $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" +} + +if (-not (Test-Path -Path $MAVEN_M2_PATH)) { + New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null +} + +$MAVEN_WRAPPER_DISTS = $null +if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { + $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" +} else { + $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" } -$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' + +$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" +$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' $MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { @@ -134,7 +148,33 @@ if ($distributionSha256Sum) { # unzip and move Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +$actualDistributionDir = "" + +# First try the expected directory name (for regular distributions) +$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" +$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" +if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { + $actualDistributionDir = $distributionUrlNameMain +} + +# If not found, search for any directory with the Maven executable (for snapshots) +if (!$actualDistributionDir) { + Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { + $testPath = Join-Path $_.FullName "bin/$MVN_CMD" + if (Test-Path -Path $testPath -PathType Leaf) { + $actualDistributionDir = $_.Name + } + } +} + +if (!$actualDistributionDir) { + Write-Error "Could not find Maven distribution directory in extracted archive" +} + +Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null try { Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null } catch { From 799c4e92d02f5336eb4591ebc1d9cb154c86b6e9 Mon Sep 17 00:00:00 2001 From: Daniel Garnier-Moiroux Date: Wed, 21 Oct 2026 21:34:25 +0200 Subject: [PATCH 2/5] Bump build plugins - maven-compiler-plugin 3.16.0 - maven-surefire-plugin 3.6.0 - maven-source-plugin 3.4.0 - maven-jar-plugin 3.5.1 - maven-deploy-plugin 3.2.0 - flatten-maven-plugin 1.8.0 - bnd-maven-plugin 7.4.0 - exec-maven-plugin 3.6.4 - maven-shade-plugin 3.6.2 - spring-javaformat-maven-plugin 0.0.48 maven-javadoc-plugin stays on 3.11.2: 3.12.0 does not create a javadoc jar for modules without documentable sources, such as mcp, and Maven Central requires one. Signed-off-by: Daniel Garnier-Moiroux --- .../client-jdk-http-client/pom.xml | 2 +- conformance-tests/server-servlet/pom.xml | 2 +- pom.xml | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conformance-tests/client-jdk-http-client/pom.xml b/conformance-tests/client-jdk-http-client/pom.xml index fca782c52..a4e8ad3bb 100644 --- a/conformance-tests/client-jdk-http-client/pom.xml +++ b/conformance-tests/client-jdk-http-client/pom.xml @@ -46,7 +46,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.1 + 3.6.2 package diff --git a/conformance-tests/server-servlet/pom.xml b/conformance-tests/server-servlet/pom.xml index a082f8c4e..bd43d40ca 100644 --- a/conformance-tests/server-servlet/pom.xml +++ b/conformance-tests/server-servlet/pom.xml @@ -62,7 +62,7 @@ org.codehaus.mojo exec-maven-plugin - 3.1.0 + 3.6.4 io.modelcontextprotocol.conformance.server.ConformanceServlet false diff --git a/pom.xml b/pom.xml index 351867d7c..c3a9acd0d 100644 --- a/pom.xml +++ b/pom.xml @@ -74,28 +74,28 @@ 6.2.1 - 3.11.0 - 3.1.2 + 3.16.0 + 3.6.0 3.5.2 3.11.2 - 3.3.0 + 3.4.0 0.8.10 - 1.5.0 - 3.1.1 + 1.8.0 + 3.2.0 2.2.3 3.7.0 3.5.0 4.0.0-M13 3.4.5 - 3.3.0 - 0.0.47 + 3.5.1 + 0.0.48 1.0.0-alpha.4 0.0.4 1.6.2 11.0.2 6.1.0 4.2.0 - 7.1.0 + 7.4.0 4.1.0 2.0.0 3.0.0 @@ -266,7 +266,7 @@ org.codehaus.mojo exec-maven-plugin - 3.1.0 + 3.6.4 true ignored From 28ebf15dbcdd1cc9842f001db93a0072d2fd66bd Mon Sep 17 00:00:00 2001 From: Daniel Garnier-Moiroux Date: Wed, 21 Oct 2026 21:34:25 +0200 Subject: [PATCH 3/5] Bump release plugins - maven-gpg-plugin 3.2.8 - central-publishing-maven-plugin 0.12.0 Signed-off-by: Daniel Garnier-Moiroux --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c3a9acd0d..a3c5a4dfe 100644 --- a/pom.xml +++ b/pom.xml @@ -325,7 +325,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.7.0 + 0.12.0 true central @@ -338,7 +338,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.7 + 3.2.8 sign-artifacts From 4a6ab93fee58245aa598bb0291763d56bbf71d3f Mon Sep 17 00:00:00 2001 From: Daniel Garnier-Moiroux Date: Wed, 21 Oct 2026 21:34:25 +0200 Subject: [PATCH 4/5] Bump test dependencies - assertj 3.27.7 - junit 6.1.3 - mockito 5.24.0 - byte-buddy 1.18.15 - testcontainers toxiproxy 1.21.4 - logback 1.6.5 - tomcat 11.0.27 - awaitility 4.3.0 - json-unit-assertj 4.1.1 - gson 2.14.0 - spring-framework 6.2.19 Recent Tomcat versions no longer lower-case request header names, so record headers in a case-insensitive map in McpTestRequestRecordingServletFilter. Signed-off-by: Daniel Garnier-Moiroux --- mcp-core/pom.xml | 2 +- .../McpTestRequestRecordingServletFilter.java | 14 ++++++------- pom.xml | 20 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/mcp-core/pom.xml b/mcp-core/pom.xml index 8d292349a..ef052db76 100644 --- a/mcp-core/pom.xml +++ b/mcp-core/pom.xml @@ -168,7 +168,7 @@ com.google.code.gson gson - 2.10.1 + 2.14.0 test diff --git a/mcp-test/src/test/java/io/modelcontextprotocol/server/transport/McpTestRequestRecordingServletFilter.java b/mcp-test/src/test/java/io/modelcontextprotocol/server/transport/McpTestRequestRecordingServletFilter.java index b94552d12..b35e1ad0f 100644 --- a/mcp-test/src/test/java/io/modelcontextprotocol/server/transport/McpTestRequestRecordingServletFilter.java +++ b/mcp-test/src/test/java/io/modelcontextprotocol/server/transport/McpTestRequestRecordingServletFilter.java @@ -14,8 +14,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; +import java.util.TreeMap; import jakarta.servlet.Filter; import jakarta.servlet.FilterChain; @@ -41,12 +40,13 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo throws IOException, ServletException { if (servletRequest instanceof HttpServletRequest req) { - var headers = Collections.list(req.getHeaderNames()) - .stream() - .collect(Collectors.toUnmodifiableMap(Function.identity(), - name -> String.join(",", Collections.list(req.getHeaders(name))))); + // Header names are case-insensitive; servlet containers may or may not + // normalize them + var headers = new TreeMap(String.CASE_INSENSITIVE_ORDER); + Collections.list(req.getHeaderNames()) + .forEach(name -> headers.put(name, String.join(",", Collections.list(req.getHeaders(name))))); var request = new CachedBodyHttpServletRequest(req); - calls.add(new Call(req.getMethod(), headers, request.getBodyAsString())); + calls.add(new Call(req.getMethod(), Collections.unmodifiableMap(headers), request.getBodyAsString())); filterChain.doFilter(request, servletResponse); } else { diff --git a/pom.xml b/pom.xml index a3c5a4dfe..f3c36525c 100644 --- a/pom.xml +++ b/pom.xml @@ -59,19 +59,19 @@ 17 - 3.27.6 - 6.0.2 - 5.20.0 + 3.27.7 + 6.1.3 + 5.24.0 1.21.4 - 1.17.8 - 1.21.0 + 1.18.15 + 1.21.4 2.0.16 - 1.5.15 + 1.6.5 2.20 2.20.1 3.0.3 - 6.2.1 + 6.2.19 3.16.0 @@ -92,11 +92,11 @@ 1.0.0-alpha.4 0.0.4 1.6.2 - 11.0.2 + 11.0.27 6.1.0 - 4.2.0 + 4.3.0 7.4.0 - 4.1.0 + 4.1.1 2.0.0 3.0.0 From fe45bfa7fc48eb81aa6cf1013e1ecfb104b739d4 Mon Sep 17 00:00:00 2001 From: Daniel Garnier-Moiroux Date: Wed, 21 Oct 2026 21:34:26 +0200 Subject: [PATCH 5/5] Bump Spring conformance client dependencies - spring-boot 4.1.1 - spring-ai 2.0.1 Signed-off-by: Daniel Garnier-Moiroux --- conformance-tests/client-spring-http-client/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance-tests/client-spring-http-client/pom.xml b/conformance-tests/client-spring-http-client/pom.xml index f42083188..78755b1be 100644 --- a/conformance-tests/client-spring-http-client/pom.xml +++ b/conformance-tests/client-spring-http-client/pom.xml @@ -22,8 +22,8 @@ 17 - 4.0.2 - 2.0.0-M2 + 4.1.1 + 2.0.1 true