This document provides instructions for publishing jvm-functional-utils to Maven Central using the com.brentzey namespace.
✅ COMPLETED - Your com.brentzey namespace is already verified on Sonatype Maven Central.
You can manage your publications at: https://central.sonatype.com/
Maven Central requires all artifacts to be signed with GPG.
# Generate a new GPG key pair
gpg --gen-key
# Follow the prompts:
# - Use RSA and RSA
# - Key size: 4096 bits
# - Key validity: 0 (does not expire) or choose an expiration
# - Real name: Your Name
# - Email: your.email@example.com
# List your keys to get the key ID
gpg --list-keys
# Output will look like:
# pub rsa4096 2026-01-10 [SC]
# ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234
# uid [ultimate] Your Name <your.email@example.com>
# The key ID is the last 8 characters of the fingerprint
# Export your public key to a key server
gpg --keyserver keyserver.ubuntu.com --send-keys YOURKEYID
# Export your private key as base64 for GitHub Secrets
gpg --export-secret-keys YOURKEYID | base64 > private-key.txt
# Get your key ID (last 8 characters of fingerprint)
gpg --list-secret-keys --keyid-format SHORTAdd the following secrets to your GitHub repository: (Settings → Secrets and variables → Actions → New repository secret)
- MAVEN_CENTRAL_USERNAME: Your Sonatype Central Portal username
- MAVEN_CENTRAL_TOKEN: Your Sonatype Central Portal token (generate at https://central.sonatype.com/account)
- SIGNING_KEY_ID: Your GPG key ID (last 8 characters)
- SIGNING_KEY: Your base64-encoded GPG private key (from private-key.txt)
- SIGNING_PASSWORD: The passphrase for your GPG key
The project is configured with:
- Group ID:
com.brentzey.functional - Artifact ID:
jvm-functional-utils - Package:
com.brentzey.functional
All source files use the correct package structure matching the Maven Central namespace.
The project uses GitHub Actions for automated publishing:
-
Update the version in
lib/build.gradle.kts(remove-SNAPSHOT):version = "1.0.0" // No -SNAPSHOT suffix
-
Commit and push your changes:
git add lib/build.gradle.kts git commit -m "Release version 1.0.0" git push origin main -
Create and push a release tag:
git tag -a v1.0.0 -m "Release version 1.0.0" git push origin v1.0.0 -
Monitor the release:
- Go to GitHub Actions tab
- Watch the "Release to Maven Central" workflow
- It will automatically:
- Build the project
- Run all tests
- Sign the artifacts
- Publish to Maven Central
- Create a GitHub Release
-
Verify publication:
- Check https://central.sonatype.com/ (may take 15-30 minutes)
- Artifacts will sync to Maven Central within 2 hours
- Search at: https://search.maven.org/search?q=g:com.brentzey.functional
Snapshots are automatically published on every push to main branch:
- Keep
-SNAPSHOTsuffix in version - Push to main branch
- CI/CD pipeline publishes automatically
If you prefer to publish manually:
# Make sure all secrets are set as environment variables
export MAVEN_CENTRAL_USERNAME=your-username
export MAVEN_CENTRAL_TOKEN=your-token
export SIGNING_KEY_ID=your-key-id
export SIGNING_KEY=your-base64-key
export SIGNING_PASSWORD=your-passphrase
# Build and publish
./gradlew clean build publishAllPublicationsToCentralPortalRepositoryAfter publishing, verify your artifact is available:
-
Sonatype Central Portal: https://central.sonatype.com/
- Search for:
com.brentzey.functional
- Search for:
-
Maven Central Search: https://search.maven.org/
- Search for:
g:com.brentzey.functional a:jvm-functional-utils
- Search for:
-
Direct URL: https://repo1.maven.org/maven2/com/brentzey/functional/jvm-functional-utils/
Note: It can take up to 2 hours for artifacts to appear on Maven Central after publication.
Once published, users can add your library as a dependency:
dependencies {
implementation("com.brentzey.functional:jvm-functional-utils:1.0.0")
}dependencies {
implementation 'com.brentzey.functional:jvm-functional-utils:1.0.0'
}<dependency>
<groupId>com.brentzey.functional</groupId>
<artifactId>jvm-functional-utils-jvm</artifactId>
<version>1.0.0</version>
</dependency>For snapshot releases (versions ending in -SNAPSHOT):
- Snapshots are published automatically on every push to main
- Available at: https://central.sonatype.com/ (Sonatype's snapshot repository)
- Note: The new Sonatype Central Portal handles snapshots differently than the legacy OSSRH system
- Check that MAVEN_CENTRAL_USERNAME and MAVEN_CENTRAL_TOKEN are correct
- Verify you're using credentials from https://central.sonatype.com/account (not legacy OSSRH)
- Regenerate your token if needed
- Verify your GPG key is correctly base64-encoded
- Check that SIGNING_PASSWORD matches your GPG key passphrase
- Ensure SIGNING_KEY_ID is the correct 8-character ID
- Verify
com.brentzeynamespace is verified at https://central.sonatype.com/ - Ensure group ID in build.gradle.kts is
com.brentzey.functional
- Check publication status at https://central.sonatype.com/
- Wait up to 2 hours for synchronization to Maven Central
- Verify on https://search.maven.org/
- Ensure the version in
lib/build.gradle.ktsmatches the git tag - Example: If tag is
v1.0.0, version should be1.0.0(no -SNAPSHOT)
For questions or issues, please open an issue on GitHub.