diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index f198b64..beca007 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -74,7 +74,7 @@ jobs: deploy-to-maven-central: needs: check-version - # use environment maven-central, where secrets are configured for OSSRH_* + # use environment maven-central, where secrets are configured for MAVEN_CENTRAL_PORTAL_* environment: name: maven-central url: https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd-build-tools-config/ @@ -92,15 +92,15 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'maven' - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-passphrase: MAVEN_GPG_PASSPHRASE gpg-private-key: ${{ secrets.PMD_CI_GPG_PRIVATE_KEY }} - name: Build and Publish env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_PORTAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PORTAL_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.PMD_CI_GPG_PASSPHRASE }} run: | ./mvnw --show-version --errors --batch-mode \ diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 60b3932..e7fc6c7 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -67,10 +67,10 @@ jobs: deploy-to-maven-central: needs: check-version - # use environment maven-central, where secrets are configured for OSSRH_* + # use environment maven-central, where secrets are configured for MAVEN_CENTRAL_PORTAL_* environment: name: maven-central - url: https://oss.sonatype.org/content/repositories/snapshots/net/sourceforge/pmd/pmd-build-tools-config/ + url: https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/net/sourceforge/pmd/pmd-build-tools-config/ runs-on: ubuntu-latest timeout-minutes: 20 defaults: @@ -85,15 +85,15 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'maven' - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-passphrase: MAVEN_GPG_PASSPHRASE gpg-private-key: ${{ secrets.PMD_CI_GPG_PRIVATE_KEY }} - name: Build and Publish env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_PORTAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PORTAL_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.PMD_CI_GPG_PASSPHRASE }} run: | ./mvnw --show-version --errors --batch-mode \ diff --git a/README.md b/README.md index e38bb28..5f5fa01 100644 --- a/README.md +++ b/README.md @@ -796,6 +796,8 @@ Don't forget to update the secret `PMD_CI_GPG_PRIVATE_KEY` with the renewed priv ### Nexus Staging Maven Plugin +⚠ This is deprecated, see + See . This plugin is used, to upload maven artifacts to https://oss.sonatype.org/ and eventually to maven central diff --git a/pom.xml b/pom.xml index 1c51473..fd964ef 100644 --- a/pom.xml +++ b/pom.xml @@ -32,16 +32,6 @@ https://github.com/pmd/build-tools HEAD - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - 2025-05-09T17:35:04Z @@ -202,9 +192,9 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + org.sonatype.central + central-publishing-maven-plugin + 0.7.0 @@ -280,31 +270,19 @@ - org.sonatype.plugins - nexus-staging-maven-plugin + org.sonatype.central + central-publishing-maven-plugin true - ossrh - https://oss.sonatype.org/ + central + true + published + ${project.artifactId} - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - sign @@ -330,6 +308,35 @@ + + central-portal-snapshots + + + Central Portal Snapshots + central-portal-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + false + + + true + + + + + + Central Portal Snapshots + central-portal-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + false + + + true + + + +