From 7cda03572bf160854e68994bbb4613c0881e279c Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 22 Jun 2024 15:46:23 +0200 Subject: [PATCH 1/6] [Build] Enabled gpg-signing for snapshot builds again --- .github/workflows/maven-build-master-and-publish-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-build-master-and-publish-snapshot.yml b/.github/workflows/maven-build-master-and-publish-snapshot.yml index 5b4d34450f..fc966f964a 100644 --- a/.github/workflows/maven-build-master-and-publish-snapshot.yml +++ b/.github/workflows/maven-build-master-and-publish-snapshot.yml @@ -22,7 +22,7 @@ jobs: with: gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - - run: mvn -f symja_android_library -B -U -P publish-to-maven-central,exact-target-jdk deploy -Dgpg.skip=true + - run: mvn -f symja_android_library -B -U -e -P publish-to-maven-central,exact-target-jdk deploy # Deployment of all modules is deferred to the last module by nexus-staging-maven-plugin env: MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }} From 91523fbdd00d1870784cee9ea349c43ffae45827 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Mon, 8 Sep 2025 09:56:17 +0200 Subject: [PATCH 2/6] [RelEng] Migrate publishing to new Maven Central Portal --- .github/actions/setup-java-for-deployment/action.yml | 4 ++-- .../workflows/maven-build-master-and-publish-snapshot.yml | 6 +++--- .github/workflows/maven-perform-release.yml | 4 ++-- symja_android_library/pom.xml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/setup-java-for-deployment/action.yml b/.github/actions/setup-java-for-deployment/action.yml index 7438d85f62..1b00aa0542 100644 --- a/.github/actions/setup-java-for-deployment/action.yml +++ b/.github/actions/setup-java-for-deployment/action.yml @@ -18,8 +18,8 @@ runs: 17 distribution: 'temurin' cache: 'maven' # Cache Maven dependencies between workflow runs - # Properties for deployment to OSSRH: - server-id: ossrh + # Properties for deployment to Maven Central Portal: + server-id: sonatype-central-portal server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD # Properties for gpg signing: diff --git a/.github/workflows/maven-build-master-and-publish-snapshot.yml b/.github/workflows/maven-build-master-and-publish-snapshot.yml index fc966f964a..37f17d241e 100644 --- a/.github/workflows/maven-build-master-and-publish-snapshot.yml +++ b/.github/workflows/maven-build-master-and-publish-snapshot.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Maven and will publish snapshot versions to the OSSRH Snapshots repository +# This workflow will build a Java project with Maven and will publish snapshot versions to the Central Portal Snapshots repository # For more information see: # https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-Apache-Maven # https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-maven @@ -25,6 +25,6 @@ jobs: - run: mvn -f symja_android_library -B -U -e -P publish-to-maven-central,exact-target-jdk deploy # Deployment of all modules is deferred to the last module by nexus-staging-maven-plugin env: - MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_TOKEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/.github/workflows/maven-perform-release.yml b/.github/workflows/maven-perform-release.yml index fa62c3b572..81e7cf902d 100644 --- a/.github/workflows/maven-perform-release.yml +++ b/.github/workflows/maven-perform-release.yml @@ -64,8 +64,8 @@ jobs: - run: mvn -f symja_android_library -B release:perform -DlocalCheckout=true # Deployment of all modules is deferred to the last module by nexus-staging-maven-plugin env: - MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_TOKEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Publish release commits and tag to master diff --git a/symja_android_library/pom.xml b/symja_android_library/pom.xml index 114c16dce2..b530447e37 100644 --- a/symja_android_library/pom.xml +++ b/symja_android_library/pom.xml @@ -78,8 +78,8 @@ https://oss.sonatype.org/service/local/staging/deploy/maven2 - ossrh - https://oss.sonatype.org/content/repositories/snapshots + sonatype-central-portal + https://central.sonatype.com/repository/maven-snapshots From 8b010031211f357a50d7ba43f41ddd715e7e424e Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 22 Jun 2024 15:49:47 +0200 Subject: [PATCH 3/6] [TMP] Test signing on PR builds --- .../workflows/maven-build-master-and-publish-snapshot.yml | 7 ++++++- .github/workflows/maven-perform-release.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven-build-master-and-publish-snapshot.yml b/.github/workflows/maven-build-master-and-publish-snapshot.yml index 37f17d241e..909da49f57 100644 --- a/.github/workflows/maven-build-master-and-publish-snapshot.yml +++ b/.github/workflows/maven-build-master-and-publish-snapshot.yml @@ -7,7 +7,7 @@ name: Maven build and publish Master Snapshot on: push: - branches: [ master ] + branches: [ master, enable-gpg-signing ] jobs: maven-build-master-and-publish-to-maven-central: @@ -28,3 +28,8 @@ jobs: MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_TOKEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + - uses: actions/upload-artifact@v4 + with: + name: Package + path: '**/target/*' + \ No newline at end of file diff --git a/.github/workflows/maven-perform-release.yml b/.github/workflows/maven-perform-release.yml index 81e7cf902d..5789333177 100644 --- a/.github/workflows/maven-perform-release.yml +++ b/.github/workflows/maven-perform-release.yml @@ -27,7 +27,7 @@ jobs: # Perform the usual maven-release-plugin procedure, but prevent the release commits # and tag from being pushed to the master immediately. They are only pushed after # the release is performed successfully. This avoids to have the release - # commits on the master in case release publication fails in the last step). + # commits on the master in case release publication fails in the last step. # All file-system/git-operations are performed on the runnner's clone of this repo - run: mvn -f symja_android_library -B release:clean release:prepare -DpushChanges=false From 93195c2cc0c4cbfc543700f430b38b1693af1575 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Mon, 8 Sep 2025 13:30:55 +0200 Subject: [PATCH 4/6] [FIXUP] --- .github/workflows/maven-perform-release.yml | 3 +- symja_android_library/pom.xml | 48 ++++++++++----------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/maven-perform-release.yml b/.github/workflows/maven-perform-release.yml index 5789333177..ed5357a0a3 100644 --- a/.github/workflows/maven-perform-release.yml +++ b/.github/workflows/maven-perform-release.yml @@ -30,7 +30,8 @@ jobs: # commits on the master in case release publication fails in the last step. # All file-system/git-operations are performed on the runnner's clone of this repo - - run: mvn -f symja_android_library -B release:clean release:prepare -DpushChanges=false + - run: mvn -f symja_android_library -B release:clean release:prepare \ + -DaltDeploymentRepository=id::njord:template:release-sca - name: Read release version run: | # Create environment variables associcated to release version, derived from the release tag diff --git a/symja_android_library/pom.xml b/symja_android_library/pom.xml index b530447e37..ae51aeba31 100644 --- a/symja_android_library/pom.xml +++ b/symja_android_library/pom.xml @@ -36,11 +36,9 @@ - @@ -74,8 +72,10 @@ - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 + sonatype-central-portal + + https://repo.maven.apache.org/maven2 sonatype-central-portal @@ -95,7 +95,7 @@ - maven-snapshots + maven-central-snapshots https://central.sonatype.com/repository/maven-snapshots/ default @@ -114,6 +114,9 @@ false 32.0 + 0.8.3 + njord:template:release-sca + njord:template:snapshot-sca @@ -497,9 +500,9 @@ v@{project.version} true false - - publish-to-maven-central,exact-target-jdk + publish-to-maven-central,exact-target-jdk -Drelease.build=true + false @@ -552,16 +555,22 @@ 3.5.1 - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + eu.maveniverse.maven.plugins + njord + ${njord.version} - ossrh - https://oss.sonatype.org/ + sonatype-cp + + + eu.maveniverse.maven.njord + extension3 + ${njord.version} + + org.apache.maven.plugins @@ -738,17 +747,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - true - - ${deployment.suppress} - - false - - From b5edd044971ad14c00e091f89265e4db21cdf904 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Mon, 8 Sep 2025 13:47:58 +0200 Subject: [PATCH 5/6] [REMOVE] Lock snapshots: versions:lock-snapshots --- symja_android_library/pom.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/symja_android_library/pom.xml b/symja_android_library/pom.xml index ae51aeba31..e93a1e3cbb 100644 --- a/symja_android_library/pom.xml +++ b/symja_android_library/pom.xml @@ -235,7 +235,7 @@ org.apfloat apfloat - 1.14.1-SNAPSHOT + 1.14.1-20250825.195357-4 org.codehaus.janino @@ -253,34 +253,34 @@ 1.1.3 - org.hipparchus - hipparchus-core - 4.1-SNAPSHOT - + org.hipparchus + hipparchus-core + 4.1-20250905.124235-15 + org.hipparchus hipparchus-clustering - 4.1-SNAPSHOT + 4.1-20250905.124235-15 org.hipparchus hipparchus-fft - 4.1-SNAPSHOT + 4.1-20250905.124235-15 org.hipparchus hipparchus-fitting - 4.1-SNAPSHOT + 4.1-20250905.124235-15 org.hipparchus hipparchus-ode - 4.1-SNAPSHOT + 4.1-20250905.124235-15 org.hipparchus hipparchus-optim - 4.1-SNAPSHOT + 4.1-20250905.124235-15 org.jgrapht @@ -501,7 +501,7 @@ true false publish-to-maven-central,exact-target-jdk - -Drelease.build=true + -Drelease.build=true -DskipTests false From 877a461597ae3cb202c217cc0b9ce82414024eca Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Mon, 8 Sep 2025 14:43:40 +0200 Subject: [PATCH 6/6] [FIXUP] More. Requires non-snapshot version (use mvn versions:set -DnewVersion=3.1.0) --- .../maven-build-master-and-publish-snapshot.yml | 2 +- symja_android_library/pom.xml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-build-master-and-publish-snapshot.yml b/.github/workflows/maven-build-master-and-publish-snapshot.yml index 909da49f57..61a4e15b2e 100644 --- a/.github/workflows/maven-build-master-and-publish-snapshot.yml +++ b/.github/workflows/maven-build-master-and-publish-snapshot.yml @@ -22,7 +22,7 @@ jobs: with: gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - - run: mvn -f symja_android_library -B -U -e -P publish-to-maven-central,exact-target-jdk deploy + - run: mvn -f symja_android_library -B -U -ntp -e -P publish-to-maven-central,exact-target-jdk deploy # Deployment of all modules is deferred to the last module by nexus-staging-maven-plugin env: MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_TOKEN_USERNAME }} diff --git a/symja_android_library/pom.xml b/symja_android_library/pom.xml index e93a1e3cbb..76f9a502d0 100644 --- a/symja_android_library/pom.xml +++ b/symja_android_library/pom.xml @@ -117,6 +117,11 @@ 0.8.3 njord:template:release-sca njord:template:snapshot-sca + + USER_MANAGED + + sonatype-central-portal + sonatype-central-portal @@ -560,6 +565,7 @@ ${njord.version} sonatype-cp +
true
@@ -704,6 +710,9 @@ publish-to-maven-central + + id::njord:template:release-sca +