This document describes the manual process for publishing a new version of pojo-tester to Maven Central.
https://github.com/OpenJavaLibs/pojo-tester
https://central.sonatype.com/artifact/io.github.openjavalibs/pojo-tester
https://central.sonatype.com/publishing/deployments
https://central.sonatype.com/publishing/namespaces
Current verified namespaces:
| Namespace | Status | Notes |
|---|---|---|
io.github.openjavalibs |
✅ Verified | SNAPSHOTs enabled, Insights enabled |
io.github.srikanthkapila |
✅ Verified | Personal namespace |
- GitHub repository is up to date.
- Sonatype Central account is linked to the GitHub account that owns
io.github.openjavalibs. - GPG key is already configured.
- Maven credentials are configured in
~/.m2/settings.xml.
If releasing a bug fix:
git checkout -b release/1.2.1Otherwise, release directly from main.
Update the version in pom.xml.
Example:
<version>1.2.1</version>git add .
git commit -m "Release 1.2.1"
git pushmvn clean verifyVerify that:
- All tests pass.
- Sources JAR is generated.
- Javadoc JAR is generated.
- Artifacts are signed successfully.
mvn clean deployExpected output:
Uploaded bundle successfully
deploymentId: <deployment-id>
Open:
https://central.sonatype.com/publishing/deployments
- Wait until the deployment status becomes VALIDATED.
- Click Publish.
- Wait for the status to change to PUBLISHED.
Verify the published artifact:
https://central.sonatype.com/artifact/io.github.openjavalibs/pojo-tester
git tag v1.2.1
git push origin v1.2.1gpg: signing failed: Inappropriate ioctl for device
export GPG_TTY=$(tty)Verify:
echo $GPG_TTYExpected output:
/dev/ttys004
Retry:
mvn clean deployUnrecognized field "warnings"
An older version of the Sonatype Central Publishing Maven Plugin cannot parse the latest API response.
The artifact upload usually succeeds despite the build failure.
- Open the Deployments page.
- Verify the deployment exists.
- If the status is VALIDATED, publish it manually.
- Upgrade the
central-publishing-maven-pluginbefore the next release.
Maven Central versions are immutable.
Increase the version in pom.xml and deploy again.
git status
git branch
git checkout main
git pull
mvn clean verify
mvn clean deploy
git tag v1.2.1
git push origin v1.2.1