Skip to content

Add snapshot publication to maven central via manually dispatched workflow - #5

Merged
sehrope merged 15 commits into
pgjdbc:mainfrom
sehrope:add-manual-snapshot-publish
Nov 29, 2026
Merged

sehrope merged 15 commits into
pgjdbc:mainfrom
sehrope:add-manual-snapshot-publish

Conversation

@sehrope

@sehrope sehrope commented Nov 29, 2026

Copy link
Copy Markdown
Member

Adds a workflow that we can run manually to publish snapshots to maven central.

We'll eventually replace this with automated snapshots on main and actual signed releases. But this gets us one step closer and doesn't require any signing keys or longer term releases.

The publication steps were first tested using a io.github.sehrope test repo with the groupId being replaced in a standalone commit. We can't really test the publication action itself until it's merged so we'll try it out and then see how it goes.

Every inter-module dependency named the groupId literally, so publishing
the reactor under other coordinates meant editing 15 dependency blocks
as well as the parent references. With the property, only the root
groupId and the <parent> blocks name it.
The other three build-only modules set maven.deploy.skip; the coverage
aggregate did not, so a deploy would have pushed its POM.
Records how the Central Portal works today (OSSRH is gone, user-token
auth only, manual Publish gate, no OIDC), how pgjdbc publishes from its
build-logic (nmcp aggregation, release parameter selecting snapshot repo
or in-memory PGP signing, CI-held key), and the fork-first rehearsal:
snapshots then a release under io.github, with the groupId swapped in
one spot and the wiring merged back afterwards.
Central refuses a POM without them. Children inherit them unchanged,
not with their artifactId appended.
…oc in {@code}

doclint reads a bare << as malformed HTML.
…g it

Core does not read java.sql, so the link cannot resolve.
PreparedStatement declares no toString(), and LATEST is Mode.LATEST.
autoPublish is off, so a release waits in the Portal for a manual
Publish. The build-only modules are excluded by name.
Central requires all three on a release. The profile keeps them out of
the everyday build. The build-only modules skip them.
Holds no secret, so it can be committed. Passed with -s on the deploy
only: in maven.config it would replace ~/.m2/settings.xml for every
build.
Run from the Actions tab. It refuses a non-SNAPSHOT version and a
missing token, and deploy runs the unit tests and gates before the
upload.
Lists each artifact the build publishes with its timestamped snapshot
build, read back from the repository, and a dependency snippet.
@sehrope
sehrope merged commit 7cea8de into pgjdbc:main Nov 29, 2026
10 checks passed
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