Skip to content

[ACL-296] Move publishing to Maven Central#367

Merged
dili91 merged 14 commits into
mainfrom
ACL-296-fix-snapshot-release-403
Aug 7, 2025
Merged

[ACL-296] Move publishing to Maven Central#367
dili91 merged 14 commits into
mainfrom
ACL-296-fix-snapshot-release-403

Conversation

@dili91

@dili91 dili91 commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

This PR migrates the publishing pipeline from Bintray/JCenter to Maven Central using the vanniktech gradle-maven-publish-plugin and resolves the 403 errors we were experiencing with the previous publishing setup.

Background

The Nexus Repository Manager v2 and dependent services, including OSSRH, reached end-of-life on June 30, 2025. This necessitated the migration to either a newer version of Nexus Sonatype(v3) or to Maven Central for our publishing pipeline.

Considering that:

  • We don't really take advantage of Nexus Sonatype at the minute, but we have been using it just as proxy to Maven central
  • When we originally set up the release pipeline, we would have considered publishing directly to Maven Central, but at the time, the only way to automate this process was to publish to Nexus Sonatype and have that streaming artifacts to Maven central. This problem does not apply anymore nowadays, given that the Maven Central Portal has now APIs that we can integrate in our pipeline

I'm proposing to move our publishing directly to Maven Central.

Changes for us

  • Added vanniktech gradle-maven-publish-plugin for Maven Central publishing
  • Updated CI workflows to support the new publishing mechanism
  • Configured proper signing and publishing settings for Maven Central
  • Enabled signing with signAllPublications()

Impact for customers

Customers don't have to change anything to use stable releases of the library.
There's only a consequence for customers making use of SNAPSHOTs releases: As mentioned in our README, they will have to use the updated repository link in their projects.

Migration Guide

This implementation follows the official migration guide: https://vanniktech.github.io/gradle-maven-publish-plugin/central/

For signing key configuration, this helpful comment was referenced: vanniktech/gradle-maven-publish-plugin#201 (comment). More precisely, that thread helped me understanding the expected format for the key expected by the publishing plugin.

@dili91 dili91 changed the title [ACL-296] Fix snapshot repo release 403 error [ACL-296] Move publishing to Maven Central Jul 25, 2025
Comment thread .github/workflows/release-snapshot.yml Fixed
Comment thread .github/workflows/release-snapshot.yml Fixed
Comment thread .github/workflows/workflow-branch.yml Fixed
Comment thread .github/workflows/release-snapshot.yml Fixed
Comment thread .github/workflows/release-snapshot.yml Dismissed
@dili91
dili91 force-pushed the ACL-296-fix-snapshot-release-403 branch from 0ad4578 to d2cd9cf Compare July 25, 2025 12:18
paymentResponse.getData().getId(),
paymentResponse.getData().getResourceToken(),
URI.create("http://localhost:8080/donations/callback"));
return tlClient.hppLinkBuilder()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a leftover, unrelated to the main changes contained PR

@dili91
dili91 marked this pull request as ready for review July 30, 2025 10:20
@dili91
dili91 requested review from a team as code owners July 30, 2025 10:20
tl-luca-baggi
tl-luca-baggi previously approved these changes Jul 30, 2025
…rets

- Update workflow-branch.yml to use MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD, PGP_SIGNING_IN_MEMORY_KEY secrets
- Update workflow-main.yml to use correct secret names for Maven Central publishing
- Update workflow-pr-fork.yml to use correct secret names for snapshot releases
@dili91
dili91 merged commit 580a2ce into main Aug 7, 2025
17 of 19 checks passed
@dili91
dili91 deleted the ACL-296-fix-snapshot-release-403 branch August 7, 2025 09:06
kplattret added a commit to TrueLayer/truelayer-signing that referenced this pull request Jun 25, 2026
The legacy OSSRH / Nexus host (s01.oss.sonatype.org) was EOL'd by
Sonatype on 30 June 2025 and now returns HTTP 402, which broke the
0.3.0 release. Migrate publishing to the Sonatype Central Portal,
mirroring TrueLayer/truelayer-java#367.

- Replace gradle-nexus.publish-plugin with com.vanniktech.maven.publish
  0.34.0; publish via mavenPublishing { publishToMavenCentral(true);
  signAllPublications() } (Central Portal default, automatic release).
- Drop the dead OSSRH URLs from gradle.properties.
- Switch the release trigger from a git-diff to a hosted-version check:
  query repo1.maven.org for the artifact's POM and publish only on 404
  (200 skips, any other status fails the job), mirroring the Python
  workflow. Gate on a non-SNAPSHOT version and serialize publishes with
  a concurrency group.
- Use Central Portal credentials (mavenCentral / signingInMemory env).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants