Skip to content

build: upgrade to Maven 3.10.0 and scope Central publishing credentials - #5990

Merged
SteKoe merged 1 commit into
masterfrom
build/maven-3.10
Nov 27, 2026
Merged

SteKoe merged 1 commit into
masterfrom
build/maven-3.10

Conversation

@SteKoe

@SteKoe SteKoe commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades the Maven wrapper to 3.10.0 and fixes Central publishing authentication, analogous to codecentric/chaos-monkey-spring-boot#679.

Since Maven 3.10, repository credentials are scoped to known origins. The server ID central also matches Maven's default download repository (repo.maven.apache.org), so Maven withholds the credentials from central.sonatype.com and the deployment fails with HTTP 401. See https://maven.apache.org/settings.html#server-repository-origins

Changes

  • Bump Maven wrapper from 3.9.16 to 3.10.0
  • Add .settings.xml (settings model 1.3.0) with server sonatype-publishing and repositoryOrigins set to https://central.sonatype.com; credentials still come from MAVEN_USERNAME / MAVEN_PASSWORD
  • Use sonatype-publishing as publishingServerId in the central-deploy profile
  • release-to-maven-central.yml: deploy with --settings .settings.xml -Dmaven.repository.credentialScope=strict; setup-java only sets up JDK and GPG now
  • Remove the Renovate rule pinning Maven to <3.10

Notes

  • The Renovate pin was added because of a staged maven-metadata problem with central-publishing-maven-plugin 0.11.0. The chaos-monkey PR suggests the plugin was not the cause, but this has not been verified against Central with 0.12.0, so the next release should be watched.
  • The SNAPSHOT deploy to GitHub Packages in build-main.yml is unchanged.
  • Verified locally: ./mvnw validate -P central-deploy with Maven 3.10.0 and strict credential scope. No real deploy was run.

@SteKoe
SteKoe requested a review from a team as a code owner November 27, 2026 10:48
@SteKoe
SteKoe merged commit 88d6381 into master Nov 27, 2026
2 of 3 checks passed
@SteKoe
SteKoe deleted the build/maven-3.10 branch November 27, 2026 13:09
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.

3 participants