Releasing on Maven Central
That’s a trip and a half in early June, 2025.
Maven Central is migrating users to a new portal. I can hardly complain about that. It’s a hugely important resource, I’m sure keeping it up and running is a non-trivial effort. Change is sometimes necessary.
The self-service migration worked just fine for me, for the couple of things I’ve migrated so far.
Thing is though, you have to do it before 25 June 2025.
That seems like an awfully tight deadline given that there are no official ways to publish releases with Gradle using the new portal.
The recommended solution, JReleaser, looks great. It’s a differently complicated faff to get setup and running than the standard Maven publisher plugin (which is also a fair bit of a faff). But I did manage to get it to work for a simple build.
Then I discovered it flatly cannot work with multiple Gradle subprojects. (I don’t think that’s their fault. JReleaser clearly works with a zillion different packaging systems and more complete integration with Gradle would be challenging for legitimate technical reasons.)
In principle, I know how to make a single subproject that could be used to do all the releases, but given how much of a struggle it was to get JReleaser working at all, I’m not [wasn’t? —ed] motivated to go that route.
Maybe I will be.
Because, you see, the alternative is to use the OSSRH Staging API. Which is fine. It’s a partial reimplementation of the old portal API on top of the new one. This lets you continue to use the existing Maven publishing plugin, if you can figure out the right repository URIs. They’re
https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/
for staging a real release and
https://central.sonatype.com/repository/maven-snapshots/
for snapshot releases, by the way.
Works easily out of the box for snapshot releases. But for real releases, there’s no web interface for closing and performing the release. Instead they direct you to a Swagger page where, if you can work out the bearer token, you can poke the damned REST API yourself!
I am not kidding.
I did get it to work, but I sure hope the tooling improves before I have to do it again.