From e7cd3a621586e802041521d6d814cbb70dd5e6ed Mon Sep 17 00:00:00 2001 From: Oleksandr Nikolaichuk Date: Sun, 11 Oct 2026 10:53:25 +0200 Subject: [PATCH] Keep the publish credentials on Maven 3.10 The runner image now ships Maven 3.10.0, which offers the credentials of server 'central' only to repo.maven.apache.org, so the snapshot upload to central.sonatype.com is refused with a 401. With maven.repository.credentialScope=id the server is matched by id again; Maven 3.9 ignores the property. --- .github/workflows/maven_release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven_release.yml b/.github/workflows/maven_release.yml index 0e4a44b..9054b0b 100644 --- a/.github/workflows/maven_release.yml +++ b/.github/workflows/maven_release.yml @@ -66,7 +66,8 @@ jobs: server-password: MAVEN_PASSWORD - name: Publish package - run: mvn -Dmaven.test.skip=true --batch-mode -P ossrh-publish -Dgpg.passphrase=${{ secrets.ORG_GPG_PASSPHRASE }} deploy + # Maven 3.10 offers the credentials of server 'central' only to repo.maven.apache.org; the upload goes to central.sonatype.com + run: mvn -Dmaven.test.skip=true --batch-mode -P ossrh-publish -Dmaven.repository.credentialScope=id -Dgpg.passphrase=${{ secrets.ORG_GPG_PASSPHRASE }} deploy env: MAVEN_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_TOKEN_PASSWORD }}