From 7334d01cf05e527a0c24a09e261a09482562bd83 Mon Sep 17 00:00:00 2001 From: Oryan Date: Fri, 23 Oct 2026 22:44:42 -0400 Subject: [PATCH] Declare central.sonatype.com as the central server's repository origin setup-java v6.1.0 writes repositoryOrigins into settings.xml, so the snapshot deploy no longer needs maven.repository.credentialScope=id to send credentials under Maven 3.10. The release deploy gets the same origin, which removes its credentials warning. --- .github/workflows/release.yml | 1 + .github/workflows/snapshot.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a18e7e45..b166853d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,7 @@ jobs: server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + mvn-server-repository-origins: central:https://central.sonatype.com gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} gpg-passphrase: GPG_PASSPHRASE - name: Publish release diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 4d0d8d39..217deea2 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -31,8 +31,9 @@ jobs: server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + mvn-server-repository-origins: central:https://central.sonatype.com - name: Publish release - run: mvn --batch-mode deploy -Dmaven.repository.credentialScope=id + run: mvn --batch-mode deploy env: MAVEN_USERNAME: ${{ secrets.OSS_USER_TOKEN_KEY }} MAVEN_PASSWORD: ${{ secrets.OSS_USER_TOKEN_PASS }}