Class FinalizePhase
Runs after the WorktreeGuard has restored the worktree
to main and after the Nexus deploy (and best-effort Central deploy)
have completed. Performs:
- B29 — pushes the release tag and main to origin
- B30 — creates the GitHub Release with milestone-based notes, closes the milestone, removes pending-release labels from resolved issues
The post-deploy log lines ("Release v X complete", Nexus/Central
outcome summary, GitHub Pages URLs) remain on the mojo for now —
they consume outcomes from multiple phases (Nexus, Central, Site)
and naturally land in ReleaseExecution when the orchestrator
is wired up. The reporting helpers (reportCascade,
buildReleaseReport) also stay on the mojo because the draft
path invokes them too; they extract together in Commit 6.
Carved out of ReleaseDraftMojo during the Phase 4
Commit 1 (IKE-Network/ike-issues#489).
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new finalize phase bound to the given context. -
Method Summary
-
Constructor Details
-
FinalizePhase
Creates a new finalize phase bound to the given context.- Parameters:
ctx- the per-invocation release context
-
-
Method Details
-
execute
public FinalizeOutcome execute(FinalizeInput input) throws org.apache.maven.api.plugin.MojoException Executes the finalize phase.If
FinalizeInput.hasOrigin()isfalse, pushes and the GitHub Release step are skipped (with informational log messages) — appropriate for a local-only release where no remote is configured.- Parameters:
input- the inputs accumulated byrunGoal()through the prior phases- Returns:
- a
FinalizeOutcomerecording which steps ran - Throws:
org.apache.maven.api.plugin.MojoException- if eithergit pushfails
-