This guide explains how to release a new version of the Volley Java SDK.
-
Ensure all tests pass:
mvn test -
Ensure the code compiles:
mvn clean compile
-
Update the version in
pom.xml:<version>1.0.0</version>
-
Update the version in
Version.java:public static final String VERSION = "1.0.0";
This is the simplest approach if you're not publishing to Maven Central yet.
mvn clean packageThis creates target/volley-java-1.0.0.jar
Tag the release with a semantic version (e.g., v1.0.0):
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git push origin main # or masterImportant: The tag name must start with v and match the version in pom.xml (without the v prefix).
- Go to your GitHub repository → Releases → "Draft a new release"
- Select the tag (e.g.,
v1.0.0) - Upload the JAR file:
target/volley-java-1.0.0.jar - Add release notes
- Publish
Users can download the JAR from the GitHub release page and add it to their classpath, or use it as a local Maven dependency.
To publish to Maven Central (e.g., via Sonatype OSSRH), you'll need:
- Sign up for Sonatype OSSRH and get approval for your groupId
- Configure GPG signing for artifacts
- Add distribution management to
pom.xml - Use Maven Release Plugin or manually deploy
This is more complex and requires:
- Sonatype OSSRH account
- GPG key setup
- Additional Maven configuration
For now, GitHub Releases is sufficient.
Follow Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality additions
- PATCH version for backwards-compatible bug fixes
# 1. Update versions
# Edit pom.xml: <version>1.0.0</version>
# Edit Version.java: public static final String VERSION = "1.0.0";
# 2. Test
mvn clean test
# 3. Build
mvn clean package
# 4. Commit changes
git add pom.xml src/main/java/com/volleyhooks/volley/Version.java
git commit -m "Bump version to 1.0.0"
# 5. Create and push tag
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git push origin main
# 6. Create GitHub Release
# - Go to GitHub → Releases → Draft new release
# - Select tag v1.0.0
# - Upload target/volley-java-1.0.0.jar
# - Add release notes
# - Publish- The version in
pom.xmlis the source of truth for Maven - The version in
Version.javais for runtime access - Keep both in sync
- For GitHub Releases, upload the JAR file manually
- For Maven Central, you'll need additional setup (see Option 2)