From 6b8bdec7766422e80fed7eb74878ccf69614933c Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 19 May 2025 16:14:14 +0200 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 116a656..5c85054 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,7 @@ hs_err_pid* .idea/* !.idea/saveactions_settings.xml !.idea/checkstyle-idea.xml +!.idea/externalDependencies.xml !.idea/inspectionProfiles/ .idea/inspectionProfiles/* From a0c76bcc1a1ab0c7f48a879f5c969885687536f3 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 20 May 2025 09:05:07 +0200 Subject: [PATCH 2/3] =?UTF-8?q?OSSRH=20=E2=86=92=20Sonatype=20Maven=20Cent?= =?UTF-8?q?ral=20Portal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/xdev-software/standard-maven-template/issues/155 --- .github/workflows/release.yml | 12 ++++---- .github/workflows/test-deploy.yml | 12 ++++---- template-placeholder/pom.xml | 51 +++++-------------------------- 3 files changed, 19 insertions(+), 56 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bd0f3c..2cb3393 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -121,22 +121,22 @@ jobs: git config --global user.name "GitHub Actions" git pull - - name: Set up JDK OSSRH + - name: Set up JDK uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml java-version: '17' distribution: 'temurin' - server-id: ossrh + server-id: sonatype-central-portal server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_TOKEN gpg-passphrase: MAVEN_GPG_PASSPHRASE gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - - name: Publish to OSSRH - run: ../mvnw -B deploy -Possrh -DskipTests + - name: Publish to Central Portal + run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests env: - MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 03f5339..8a85891 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -13,21 +13,21 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK OSSRH + - name: Set up JDK uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml distribution: 'temurin' java-version: '17' - server-id: ossrh + server-id: sonatype-central-portal server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_TOKEN gpg-passphrase: MAVEN_GPG_PASSPHRASE gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - - name: Publish to OSSRH - run: ../mvnw -B deploy -Possrh -DskipTests + - name: Publish to Central Portal + run: ../mvnw -B deploy -P publish-sonatype-central-portal -DskipTests working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} env: - MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 19b3fce..55fb55a 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -49,41 +49,6 @@ UTF-8 - - - - central - https://repo.maven.apache.org/maven2 - - false - - - - - - - - central - https://repo.maven.apache.org/maven2 - - false - - - - - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - @@ -176,7 +141,7 @@ - ossrh + publish-sonatype-central-portal @@ -220,16 +185,14 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + org.sonatype.central + central-publishing-maven-plugin + 0.7.0 true - ossrh - https://s01.oss.sonatype.org/ - - 30 - true + sonatype-central-portal + true + published From 1a4d9748107c3be028e90e1f42003c2c2cebfc54 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 20 May 2025 09:38:39 +0200 Subject: [PATCH 3/3] Wait until ``validated`` as deployment otherwise takes too long See https://github.com/xdev-software/standard-maven-template/issues/155 --- template-placeholder/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 55fb55a..5a67e47 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -192,7 +192,6 @@ sonatype-central-portal true - published