From c28a6cca63f85506107a77aabfeed3f315120c82 Mon Sep 17 00:00:00 2001 From: Valentin Delaye Date: Sat, 29 Aug 2026 12:29:24 +0200 Subject: [PATCH] Publish using instead of close source sonatype central plugin Signed-off-by: Valentin Delaye --- .github/workflows/release.yml | 11 ++++++++-- pom.xml | 41 +++++++++++++++-------------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f714648c..32e61b5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: cache-enabled: true settings-servers: | [{ - "id": "central", + "id": "sonatype-cp", "username": "${{ secrets.CENTRAL_USERNAME }}", "password": "${{ secrets.CENTRAL_PASSWORD }}" }] @@ -59,7 +59,14 @@ jobs: ssh-private-key: ${{ secrets.RELEASE_SSH_KEY }} - name: Maven release - run: mvn --batch-mode --update-snapshots -Dmaven.resolver.transport=wagon -DskipTests -Darguments="-DskipTests" release:prepare release:perform + run: >- + mvn --batch-mode --update-snapshots -Dmaven.resolver.transport=wagon -DskipTests + -Darguments="-DskipTests -DaltDeploymentRepository=sonatype-cp::njord: + -Dnjord.autoPublish=true -Dnjord.publisher=sonatype-cp + -Dnjord.publisher.sonatype-cp.publishingType=AUTOMATIC + -Dnjord.publisher.sonatype-cp.waitForStates=true + -Dnjord.publisher.sonatype-cp.waitForStatesTimeout=PT2H" + release:prepare release:perform env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pom.xml b/pom.xml index 55fcf737..095d5f5e 100644 --- a/pom.xml +++ b/pom.xml @@ -35,10 +35,15 @@ + sonatype-cp + ORAS Maven Central Releases + https://repo.maven.apache.org/maven2 + + central-snapshots ORAS Maven Central SNAPSHOTS https://central.sonatype.com/repository/maven-snapshots/ - + @@ -89,7 +94,7 @@ 3.4.0 3.3.1 3.2.8 - 0.11.0 + 0.9.10 2.2.0 1.0.4 2.7.1 @@ -338,6 +343,7 @@ + @@ -514,22 +520,9 @@ - org.sonatype.central - central-publishing-maven-plugin - ${central-publishing-maven-plugin.version} - true - - central - true - published - - - 7200 - - - 30 - - + eu.maveniverse.maven.plugins + njord + ${njord.version} dev.sigstore @@ -693,7 +686,13 @@ build-helper-maven-plugin - + + + eu.maveniverse.maven.njord + extension3 + ${njord.version} + + @@ -734,10 +733,6 @@ org.apache.maven.plugins maven-gpg-plugin - - org.sonatype.central - central-publishing-maven-plugin - org.apache.maven.plugins maven-release-plugin