From 1de61639a59b3f8dbd8de2f83474cf7165829ec4 Mon Sep 17 00:00:00 2001 From: akafredperry Date: Tue, 27 Jan 2026 12:15:53 +0000 Subject: [PATCH] adjust pom and github workflow to fix snapshot publishing to central portal (ossrh has been retired) --- .github/workflows/maven-deploy.yml | 22 ++- README.md | 26 ++-- at_client/pom.xml | 224 ++++++++++++----------------- 3 files changed, 113 insertions(+), 159 deletions(-) diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml index 4870807c..959b2115 100644 --- a/.github/workflows/maven-deploy.yml +++ b/.github/workflows/maven-deploy.yml @@ -1,13 +1,13 @@ # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path -name: Maven Deploy `at_client` to Nexus OSSRH +name: Maven Deploy `at_client` to Central Portal on: push: branches: - trunk - + permissions: # added using https://github.com/step-security/secure-workflows contents: read @@ -24,15 +24,11 @@ jobs: with: java-version: '8' distribution: 'adopt' - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - server-username: "MAVEN_USERNAME" # env variable for username in deploy - server-password: "MAVEN_PASSWORD" # env variable for token in deploy + server-id: central # Value of the distributionManagement/repository/id field of the pom.xml + server-username: "CENTRAL_USERNAME" # env variable for username in deploy + server-password: "CENTRAL_TOKEN" # env variable for token in deploy gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import gpg-passphrase: "GPG_PASSPHRASE" # env variable for GPG private key passphrase - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - name: Print folder run: ls -al . @@ -41,15 +37,13 @@ jobs: continue-on-error: true run: cat ~/.m2/settings.xml - - name: Publish to Apache Maven Central + - name: Publish to Central run: | mvn \ - install \ deploy \ --batch-mode \ --no-transfer-progress \ - -Dgpg.skip=false env: - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file diff --git a/README.md b/README.md index c9ea5ed0..623c4529 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,27 @@ to work with the atPlatform from Java code. The Java SDK can be added to your project through a compiled JAR or by Maven! ```xml - + - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + Central Portal Snapshots + central-portal-snapshots + https://central.sonatype.com/repository/maven-snapshots + + false + + + true + - - - - io.github.atsign-foundation + + + + + org.atsign at_client - 1.0-SNAPSHOT + 0.0.1-SNAPSHOT - + ``` ## Getting Started diff --git a/at_client/pom.xml b/at_client/pom.xml index 5f1a9e86..818dc167 100644 --- a/at_client/pom.xml +++ b/at_client/pom.xml @@ -1,29 +1,28 @@ - + 4.0.0 - ${project.groupId}:${project.artifactId} - Core atPlatform Java dependency. - https://github.com/atsign-foundation/at_java + org.atsign + at_client + 0.0.1-SNAPSHOT - - io.github.atsign-foundation - at_client - 1.0-SNAPSHOT + at_client + atsign Java client SDK + https://github.com/atsign-foundation/at_java 8 8 true UTF-8 - false - ${skipTests} - ${skipTests} - true + false + ${skipTests} + ${skipTests} - 7.14.0 - 1.2.0 - + 7.14.0 + 1.2.0 + @@ -33,32 +32,14 @@ - - Jeremy Tubongbanua - jeremy.tubongbanua@atsign.com - Atsign - https://atsign.com - - - Tyler Trott - tyler.trott@atsign.com - Atsign - https://atsign.com - - + + atsign + maven@atsign.com + atsign + https://atsign.com + - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - scm:git:git://github.com/atsign-foundation/at_java.git scm:git:ssh://git@github.com:atsign-foundation/at_java.git @@ -69,22 +50,7 @@ - maven-dependency-plugin - - - install - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - + com.googlecode.maven-download-plugin download-maven-plugin 1.6.8 @@ -131,99 +97,85 @@ ${skipUnitTests} - - org.apache.maven.plugins - maven-failsafe-plugin - 3.0.0-M7 - - ${skipIntegrationTests} - - - - - integration-test - verify - - - - - - - + + org.apache.maven.plugins + maven-failsafe-plugin + 3.0.0-M7 + + ${skipIntegrationTests} + + + + + integration-test + verify + + + + + + org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.3.1 attach-sources - - jar-no-fork - - - - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://s01.oss.sonatype.org/ - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign + + jar - - - - --pinentry-mode - loopback - - - - - - - src/main/resources - - + + org.apache.maven.plugins + maven-javadoc-plugin + 3.6.3 + + + attach-javadocs + + jar + + + false + -Xdoclint:none + true + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.4 + + + sign-artifacts + deploy + + sign + + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 + true + + central + + + + - + com.fasterxml.jackson.core jackson-core