This document describes how to release new versions of the inqwise-difference library.
Before releasing, ensure you have:
✅ GPG Key Setup: GPG key configured and available
✅ Maven Settings: ~/.m2/settings.xml configured with Sonatype credentials
✅ Repository Access: Push access to the GitHub repository
✅ Clean Working Directory: All changes committed and pushed
Use the provided release script for an automated release process:
./release.shThe script will:
- Verify prerequisites (clean working directory, GPG key)
- Run tests
- Ask for release version and next development version
- Prepare and perform the release
- Deploy to Maven Central
# Ensure working directory is clean
git status
# Run full test suite
mvn clean test
# Verify current version
mvn help:evaluate -Dexpression=project.version -q -DforceStdout# Clean any previous release attempts
mvn release:clean
# Prepare release (this will create tags and update versions)
mvn release:prepare \
-DreleaseVersion=1.1.0 \
-DdevelopmentVersion=1.2.0-SNAPSHOT \
-Dtag=v1.1.0# This will build, sign, and deploy to Maven Central
mvn release:perform- Check Maven Central: Visit Maven Central and search for
com.inqwise.difference:inqwise-difference - GitHub Release: Create a GitHub release from the created tag
- Update Documentation: Update README and CHANGELOG if needed
The project is configured with:
- Maven Release Plugin: Handles version management and tagging
- Central Publishing Plugin: Publishes to Maven Central via Sonatype
- GPG Plugin: Signs artifacts for security
- Source/Javadoc Plugins: Generates required additional artifacts
This project follows Semantic Versioning:
- Major (X.y.z): Breaking API changes
- Minor (x.Y.z): New features, backward compatible
- Patch (x.y.Z): Bug fixes, backward compatible
If you need to rollback a release:
# Rollback local changes
mvn release:rollback
# Delete the created tag (if needed)
git tag -d v1.1.0
git push origin :refs/tags/v1.1.0# Test GPG signing
echo "test" | gpg --clearsign
# List available keys
gpg --list-secret-keys- Check credentials in
~/.m2/settings.xml - Verify server ID matches:
sonatype-oss-release - Wait up to 4 hours for sync to Maven Central
"Working directory is not clean"
- Commit all changes before releasing
"Authentication failed"
- Check Maven settings and credentials
- Ensure GPG passphrase is correct
"Tag already exists"
- Use
mvn release:cleanto clean up - Delete existing tag if needed
For release issues, contact: alex@inqwise.com