From 341d0e9da17b0afabc00a559d88bf3f2a8808d69 Mon Sep 17 00:00:00 2001 From: frantuma Date: Mon, 19 May 2025 08:41:05 +0200 Subject: [PATCH 1/2] chore: migrate Sonatype OSSRH to Central Portal --- .github/dependabot.yml | 6 ++-- .github/workflows/maven-pulls.yml | 10 ++++-- .github/workflows/maven.yml | 13 ++++---- .github/workflows/prepare-release.yml | 13 ++++---- .github/workflows/release.yml | 25 ++++++-------- CI/CI.md | 2 +- pom.xml | 48 +++++---------------------- 7 files changed, 45 insertions(+), 72 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index db9dd38..3d33b4f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,9 +2,11 @@ version: 2 updates: - package-ecosystem: "maven" target-branch: "master" + open-pull-requests-limit: 5 directory: "/" schedule: interval: "daily" - ignore: - - dependency-name: "*" + time: "19:00" + allow: + - dependency-name: "io.swagger*:*" update-types: ["version-update:semver-major"] \ No newline at end of file diff --git a/.github/workflows/maven-pulls.yml b/.github/workflows/maven-pulls.yml index a676dd4..3935d76 100644 --- a/.github/workflows/maven-pulls.yml +++ b/.github/workflows/maven-pulls.yml @@ -13,13 +13,17 @@ jobs: java: [ 11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} + distribution: temurin + server-id: central + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 918bd1d..cf82ea5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -13,16 +13,17 @@ jobs: java: [ 11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} - server-id: ossrh + distribution: temurin + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -49,5 +50,5 @@ jobs: echo "not building and maven publishing project as it is a release version: " ${MY_JAVA_VERSION} fi env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 54ae638..37f7386 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: tibdex/github-app-token@v1 id: generate-token with: @@ -21,14 +21,15 @@ jobs: with: python-version: '3.10' - name: Set up Java 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 11 - server-id: ossrh + distribution: temurin + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -58,8 +59,8 @@ jobs: branch: prepare-release-${{ env.SC_VERSION }} env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SC_VERSION: SC_NEXT_VERSION: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10f5d4b..3276094 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: tibdex/github-app-token@v1 id: generate-token with: @@ -21,14 +21,16 @@ jobs: with: python-version: '3.10' - name: Set up Java 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 11 - server-id: ossrh + distribution: temurin + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }} - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} @@ -56,15 +58,10 @@ jobs: git config --global user.name "GitHub Action" git config --global hub.protocol https git remote set-url origin https://\${{ secrets.GITHUB_TOKEN }}:x-oauth-basic@github.com/swagger-api/validator-badge.git - - name: Run maven deploy/release (action-maven-publish) - uses: samuelmeuli/action-maven-publish@v1 + - name: Run maven deploy/release if: env.RELEASE_OK == 'yes' - with: - gpg_private_key: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }} - gpg_passphrase: ${{ secrets.OSSRH_GPG_PRIVATE_PASSPHRASE }} - nexus_username: ${{ secrets.OSSRH_USERNAME }} - nexus_password: ${{ secrets.OSSRH_TOKEN }} - maven_profiles: "release" + run: | + mvn --no-transfer-progress -B -Prelease deploy - name: docker login run: | docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }} @@ -204,8 +201,8 @@ jobs: exit 0 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SC_VERSION: SC_NEXT_VERSION: diff --git a/CI/CI.md b/CI/CI.md index 9bcf65b..52a22af 100644 --- a/CI/CI.md +++ b/CI/CI.md @@ -74,7 +74,7 @@ See also [here](https://github.com/peter-evans/create-pull-request/blob/master/d GPG private key and passphrase defined to be used for sonatype deployments, as detailed in https://central.sonatype.org/pages/working-with-pgp-signatures.html (I'd say with email matching the one of the sonatype account of point 1 -* `OSSRH_USERNAME` and `OSSRH_TOKEN`: sonatype user/token +* `MAVEN_USERNAME` and `MAVEN_PASSWORD`: sonatype user/token diff --git a/pom.xml b/pom.xml index 6d014ab..4c10472 100644 --- a/pom.xml +++ b/pom.xml @@ -1,29 +1,22 @@ - - org.sonatype.oss - oss-parent - 5 - 4.0.0 io.swagger.validator.v3 swagger-validator war swagger-validator + swagger-validator 2.1.7-SNAPSHOT https://github.com/swagger-api/validator-badge + + + frantuma + Francesco Tumanischvili + frantuma@yahoo.com + + 2.2.0 - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - github https://github.com/swagger-api/validator-badge/issues @@ -230,21 +223,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - ossrh - https://oss.sonatype.org/ - true - 30 - - - @@ -427,15 +405,6 @@ ${slf4j-version} - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - true - - - 8 2.18.2 @@ -455,6 +424,5 @@ 2.2.14 1.5.5 UTF-8 - https://oss.sonatype.org/content/repositories/snapshots/ From a45078c33153443cbb440c5b4440211a52e3181f Mon Sep 17 00:00:00 2001 From: frantuma Date: Mon, 19 May 2025 08:44:16 +0200 Subject: [PATCH 2/2] update dependencies --- pom.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 4c10472..a45fac5 100644 --- a/pom.xml +++ b/pom.xml @@ -407,22 +407,22 @@ 8 - 2.18.2 - 2.18.2 - 2.3 + 2.19.0 + 2.19.0 + 2.4 4.5.14 1.0.0 - 2.1.25 - 2.0.12 + 2.1.28 + 2.0.13 9.4.56.v20240826 - 1.5.16 + 1.5.18 2.0.16 3.1.2 - 3.10.0 + 3.13.0 4.13.2 - 3.27.2 + 3.27.3 2.2.14 - 1.5.5 + 1.5.6 UTF-8