Add JBang-based Maven release automation script#2473
Draft
Conversation
This commit introduces a comprehensive 2-click release automation solution for Apache Maven using JBang, designed specifically for Java developers. Features: - Complete release workflow automation following Apache procedures - GitHub integration (issues, milestones, release-drafter) - Gmail email automation for vote and announcement emails - Staging repository management with persistence - Apache distribution area management - Website deployment automation - Comprehensive cancellation and cleanup capabilities Commands: - setup: One-time environment validation and configuration - start-vote: Prepare and stage release, generate vote email (Click 1) - publish: Publish release after successful vote (Click 2) - cancel: Cancel release and clean up all staging artifacts - help: Built-in command documentation Technical Implementation: - JBang script (1,627 lines) with modern Java libraries - Picocli for professional CLI with subcommands - Jackson for JSON parsing (GitHub API integration) - Apache HttpClient for email sending via Gmail SMTP - Type-safe implementation with comprehensive error handling - Full IDE support for debugging and maintenance Benefits for Maven developers: - Familiar Java syntax instead of shell scripting - Better IDE support with debugging and refactoring - Type safety and compile-time error checking - Modern dependency management via Maven coordinates - Easier to extend and maintain for Java developers Usage: jbang src/scripts/Release.java setup jbang src/scripts/Release.java start-vote 4.0.0-rc-4 jbang src/scripts/Release.java publish 4.0.0-rc-4 Environment variables: - APACHE_USERNAME: Apache LDAP username (required) - GPG_KEY_ID: GPG key ID for signing (required) - GMAIL_USERNAME: Gmail address for email automation (optional) - GMAIL_APP_PASSWORD: Gmail app password (optional) The script maintains security by keeping all credentials local and follows Apache Maven release procedures exactly while providing modern tooling familiar to Java developers.
- Add Apache License 2.0 header to Release.java (JBang script) - Add Apache License 2.0 header to README.md (documentation) - Fixes Apache RAT check failures - Headers follow standard Apache format for Java and Markdown files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces a comprehensive 2-click release automation solution for Apache Maven using JBang, designed specifically for Java developers.
Features
Complete Release Workflow
start-vote→publish(orcancelif needed)Commands
setup: One-time environment validation and configurationstart-vote <version>: Prepare and stage release, generate vote email (Click 1)publish <version>: Publish release after successful vote (Click 2)cancel <version>: Cancel release and clean up all staging artifactshelp: Built-in command documentationTechnical Implementation
Benefits for Maven Developers
Usage
Environment Variables
Required:
APACHE_USERNAME: Apache LDAP usernameGPG_KEY_ID: GPG key ID for signingOptional (for email automation):
GMAIL_USERNAME: Gmail addressGMAIL_APP_PASSWORD: Gmail app passwordSecurity
Files Added
src/scripts/Release.java- Complete JBang release automation scriptsrc/scripts/README.md- Comprehensive documentationTesting
The script has been tested with:
Future Enhancements
Note: This is a draft PR for review and feedback. The script provides a modern, maintainable alternative to shell-based release automation that's more familiar to Maven developers.
Pull Request opened by Augment Code with guidance from the PR author