Class ReleaseDraftMojo
- All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo
- Direct Known Subclasses:
ReleasePublishMojo
This goal automates the complete release workflow in one command. All local git work completes before any external action, so a deploy failure leaves the local repository in a consistent state and the deploy can be retried manually.
Local phase (idempotent):
- Validate prerequisites (branch, clean worktree)
- Create
release/<version>branch - Set POM version to release version
- Build and verify
- Build site (pre-flight — catches javadoc errors early)
- Commit, tag
- Restore
${project.version}, merge to main - Bump to next SNAPSHOT version, verify, install, commit
The post-bump build runs install (not just
verify) so the new -SNAPSHOT artifacts land in
the local repository. For a self-hosting repo whose POM pins
ike-maven-plugin to ${project.version}, this
means the next ike:* invocation — including an
ike:release-cascade walk to the next member — resolves
the plugin without a manual install.
IKE-Network/ike-issues#486.
External phase (most reversible first, irreversible last):
- Deploy site from tagged commit (overwritable — safe to retry)
- Deploy artifacts from tagged commit — to Maven Central via
JReleaser when
ike.publishToCentralis set, else to the internal Nexus (irreversible — last) - Push tag and main to origin
- Create GitHub Release
By default this goal runs as a draft preview.
Use ike:release-publish to execute the release, or pass
-Dpublish=true explicitly.
Usage: mvn ike:release (preview),
mvn ike:release-publish (execute),
or override version with mvn ike:release-publish -DreleaseVersion=2
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractGoalMojo
execute, getLog, getPrompter, getSession
-
Constructor Details
-
ReleaseDraftMojo
public ReleaseDraftMojo()Creates this goal instance.
-
-
Method Details
-
runGoal
- Specified by:
runGoalin classAbstractGoalMojo- Throws:
org.apache.maven.api.plugin.MojoException
-