Artifacts are published to Maven Central through Sonatype staging area.
Only l10nmessages
, l10nmessages-proc
, l10nmessages-mvn-plugin
, and l10nmessages-parent
are
published. Examples and integration tests jars are not (see the modules definition in the release
profile and the default profile).
Sonatype documentation for publishing to Maven
Make sure the GPG key is accessible locally to sign artifacts
<settings>
<servers>
<server>
<id>ossrh</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
</settings>
Figure out the next version based on SemVer and Conventional Commits.
First make sure to be on the main
branch, at latest version.
git checkout main
git fetch origin main
git reset --hard origin/main
Update this document with new version while doing the release.
export NEW_VERSION=1.0.5
mvn versions:set -DnewVersion=${NEW_VERSION} -DgenerateBackupPoms=false
mvn versions:set-scm-tag -DnewTag=${NEW_VERSION} -DgenerateBackupPoms=false
./update-non-maven-versions.sh ${NEW_VERSION}
git commit -am "release: ${NEW_VERSION}"
git push
git tag ${NEW_VERSION}
git push origin ${NEW_VERSION}
Review commit and wait for CI to succeed!
This will prompt for the GPG key
GPG_TTY=$(tty) mvn clean deploy -Prelease
The next snapshot version is the release version with PATCH incremented by one and suffixed with "SNAPSHOT"
export NEW_VERSION=1.0.6-SNAPSHOT
mvn versions:set -DnewVersion=${NEW_VERSION} -DgenerateBackupPoms=false
mvn versions:set-scm-tag -DnewTag=HEAD -DgenerateBackupPoms=false
./update-non-maven-versions.sh ${NEW_VERSION}
git commit -am "release: prepare next version ${NEW_VERSION}"
git push
Again, check CI succeed.
Go to Sonatype to review the staged deployment and release it to Maven Central.
To remove tags,
git tag -d ${NEW_VERSION}
git push --delete origin ${NEW_VERSION}