Skip to content

A release goes to Maven Central - #7

Merged
tamnd merged 1 commit into
mainfrom
central
Aug 20, 2026
Merged

tamnd merged 1 commit into
mainfrom
central

Conversation

@tamnd

@tamnd tamnd commented Aug 20, 2026

Copy link
Copy Markdown
Owner

The version properties for maven-gpg-plugin and central-publishing-maven-plugin have been in the parent pom since the repository was laid out and neither plugin was ever configured, so mvn deploy would have put the artifacts nowhere at all. This wires both up and adds the workflow that runs them.

One upload for the whole reactor rather than one per module. Central validates a deployment as a unit, and a half-published version is a version nobody can use and nobody can replace. autoPublish is off, so a tag produces a deployment sitting in the portal and nothing more, and dropping it there is the only undo that exists once a version has gone out.

The version lives in the tag rather than in the pom. v0.11.0 builds 0.11.0 with versions:set and never commits it, because a repository whose version has to be bumped before every release is a repository where a checkout between the bump and the tag claims a version that was never built.

The engine and this client move on one number, so the same tag names the engine release the libraries are downloaded from, and the suite then runs against the very library that is about to be published rather than against a build of main. A release that cannot answer a query does not go out.

Central wants a sources jar and a javadoc jar beside every jar it publishes and has no way of being told that an artifact made of shared libraries has neither. So zudb-native attaches both by hand and both hold one file explaining why they are empty, which is more use to whoever opens one than a jar with nothing in it, which reads like a build that went wrong.

gpg runs with --pinentry-mode=loopback, because a release runs where there is no terminal and the default is to try to open one and hang until the job is cancelled.

A dispatch with publish unticked does everything up to the upload, so the packaging can be changed and checked without spending a version on it.

Locally mvn -Prelease,natives -DskipTests -Dgpg.skip=true package produces the ten zudb-native jars and sources and javadoc for zudb and zudb-ffm, and mvn -Prelease -DskipTests package, which is what the javadoc job in CI runs, is unchanged. Four secrets are needed before a tag will work: CENTRAL_USERNAME, CENTRAL_PASSWORD, GPG_PRIVATE_KEY and GPG_PASSPHRASE.

The version properties for the two plugins a release needs have been in
the parent pom since the repository was laid out, and neither plugin was
configured, so `mvn deploy` would have put the artifacts nowhere. It
publishes now.

One upload for the whole reactor rather than one per module, because
Central validates a deployment as a unit and a half-published version is
a version nobody can use and nobody can replace. autoPublish is off, so
what a tag produces is a deployment waiting in the portal, and dropping
it there is the only undo there is.

The version lives in the tag rather than in the pom. A repository whose
version has to be bumped in a commit before every release is a
repository where a checkout between the bump and the tag says a version
that was never built.

The engine and this client move on one number, so the tag also names the
engine release the libraries come from, and the suite runs against the
library that is about to be published rather than against a build of
main. A release that cannot answer a query does not go out.

Central wants a sources jar and a javadoc jar beside every jar and has
no way of being told that an artifact made of shared libraries has
neither, so zudb-native attaches both by hand, each holding one file
that says why it is empty. An empty jar with nothing at all in it reads
like a build that went wrong.

gpg runs with a loopback pinentry, because a release runs where there is
no terminal and the default is to open one and wait until the job is
cancelled.
@tamnd
tamnd merged commit ae3925d into main Aug 20, 2026
11 checks passed
@tamnd
tamnd deleted the central branch August 20, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant