Class ReleasePrep

java.lang.Object
network.ike.plugin.release.prep.ReleasePrep

public final class ReleasePrep extends Object
The release prep phase — B1–B12 of the ReleaseDraftMojo block audit minus the version/branch resolution that has to run before ReleaseContext can be constructed.

Concretely:

  1. B3 — require a clean worktree
  2. B4 — gh auth status / gh repo view preflight
  3. B5 — preflightJavadoc (warnings hard-fail in publish, log in draft)
  4. B6 — SNAPSHOT-in-properties scan
  5. B7 — bake the foundation snapshot if this release owns the scaffold manifest
  6. B8 — align upstream cascade ${X.version} pins to latest released versions
  7. B9 — resolve the reproducible-build timestamp from the current HEAD commit
  8. B11 — preflightChecks (gh CLI, milestone, release-cadence trailers, Maven wrapper)
  9. B12 — final pre-cut validation; rolled into the orchestrator's logAudit for now

The B10 draft-mode short-circuit lives in the orchestrator (ReleaseDraftMojo.runGoal()) — it reads PrepOutcome.draftMode() and dispatches to the draft renderer instead of continuing into the publish-only phases. The draft-renderer helpers (reportCascade, buildReleaseReport) extract to their own classes in Commit 6.

Carved out of ReleaseDraftMojo during the Phase 4 Commit 5 (IKE-Network/ike-issues#489).

  • Constructor Details

    • ReleasePrep

      public ReleasePrep(ReleaseContext ctx, org.apache.maven.api.Session session)
      Creates a new release prep phase bound to the given context.
      Parameters:
      ctx - the per-invocation release context (built before mvnw is resolved — prep does not need the wrapper)
      session - the active Maven session, needed to construct the SessionCandidateVersionResolver for foundation-bake and upstream-property alignment
  • Method Details

    • execute

      public PrepOutcome execute() throws org.apache.maven.api.plugin.MojoException
      Executes the release prep phase.
      Returns:
      a PrepOutcome carrying projectId, hasOrigin, releaseTimestamp, and the draftMode dispatch flag
      Throws:
      org.apache.maven.api.plugin.MojoException - on a worktree-state, preflight, javadoc, SNAPSHOT, or upstream-alignment failure