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 5b4d34450f..61a4e15b2e 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 @@ -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: @@ -22,9 +22,14 @@ 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 -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.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 }} + - 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 fa62c3b572..ed5357a0a3 100644 --- a/.github/workflows/maven-perform-release.yml +++ b/.github/workflows/maven-perform-release.yml @@ -27,10 +27,11 @@ 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 + - 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 @@ -64,8 +65,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..76f9a502d0 100644 --- a/symja_android_library/pom.xml +++ b/symja_android_library/pom.xml @@ -36,11 +36,9 @@ - @@ -74,12 +72,14 @@ - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 + sonatype-central-portal + + https://repo.maven.apache.org/maven2 - ossrh - https://oss.sonatype.org/content/repositories/snapshots + sonatype-central-portal + https://central.sonatype.com/repository/maven-snapshots @@ -95,7 +95,7 @@ - maven-snapshots + maven-central-snapshots https://central.sonatype.com/repository/maven-snapshots/ default @@ -114,6 +114,14 @@ false 32.0 + 0.8.3 + njord:template:release-sca + njord:template:snapshot-sca + + USER_MANAGED + + sonatype-central-portal + sonatype-central-portal @@ -232,7 +240,7 @@ org.apfloat apfloat - 1.14.1-SNAPSHOT + 1.14.1-20250825.195357-4 org.codehaus.janino @@ -250,34 +258,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 @@ -497,9 +505,9 @@ v@{project.version} true false - - publish-to-maven-central,exact-target-jdk - -Drelease.build=true + publish-to-maven-central,exact-target-jdk + -Drelease.build=true -DskipTests + false @@ -552,16 +560,23 @@ 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 +
true
+ + + eu.maveniverse.maven.njord + extension3 + ${njord.version} + + org.apache.maven.plugins @@ -695,6 +710,9 @@ publish-to-maven-central + + id::njord:template:release-sca + @@ -738,17 +756,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - true - - ${deployment.suppress} - - false - -