This guide explains how to publish Roux to Maven Central via Sonatype.
-
GPG Key - You need a GPG key for signing artifacts
# Generate a key if you don't have one gpg --gen-key # List keys to get the key ID gpg --list-keys # Export the key to a keyring file gpg --export-secret-keys -o ~/.gnupg/secring.gpg
-
Sonatype Account - You need access to the
com.cajunsystemsgroup on Sonatype -
Gradle Properties - Add signing configuration to
~/.gradle/gradle.properties:signing.keyId=<last 8 chars of your GPG key ID> signing.password=<your GPG key password> signing.secretKeyRingFile=/Users/<username>/.gnupg/secring.gpg
./gradlew test./gradlew clean createCentralBundleThis creates a zip file at lib/build/distributions/roux-0.3.0-bundle.zip containing:
- Proper Maven directory structure (
com/cajunsystems/roux/0.3.0/) roux-0.3.0.jar- Main libraryroux-0.3.0-sources.jar- Source coderoux-0.3.0-javadoc.jar- Javadocroux-0.3.0.pom- POM fileroux-0.3.0.module- Gradle metadata.ascfiles - GPG signatures for all artifacts.md5,.sha1,.sha256,.sha512files - Checksums
- Go to https://s01.oss.sonatype.org/
- Log in with your Sonatype credentials
- Click "Staging Upload" in the left sidebar
- Select "Artifact Bundle" as upload mode
- Upload the bundle zip file:
lib/build/distributions/roux-0.3.0-bundle.zip - Click "Upload Bundle"
- Go to "Staging Repositories" in the left sidebar
- Find your staging repository (usually
comcajunsystems-XXXX) - Select it and click "Close"
- Wait for validation to complete (check "Activity" tab)
- Once validated, click "Release"
- Artifacts will sync to Maven Central within ~30 minutes
Update the version in lib/build.gradle.kts:
version = "0.3.0" // Change this for new releases- All tests pass (
./gradlew test) - CHANGELOG.md is updated with release notes
- Version number is correct in
build.gradle.kts - README.md reflects current version
- Documentation is up to date
- GPG signing is configured
- Sonatype credentials are set up
Make sure your ~/.gradle/gradle.properties has the correct signing configuration.
Check that all required POM elements are present:
- name, description, url
- licenses
- developers
- scm (source control)
Ensure your GPG key is properly exported and the password is correct.
- Create a GitHub release with the same version tag
- Update documentation site (if applicable)
- Announce the release
- Monitor for issues