Class DraftRenderer

java.lang.Object
network.ike.plugin.release.report.DraftRenderer

public final class DraftRenderer extends Object
The draft-mode handler for the release pipeline.

When PrepOutcome.draftMode() is true, ReleaseDraftMojo.runGoal() short-circuits to this class instead of running the publish-only phases. The renderer logs the [DRAFT] Would … preview block, emits the cascade preview, and builds the GoalReportSpec from ReleaseReport.

No mutation happens through this path: the draft is a read-only preview of what a publish would do.

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

  • Constructor Details

    • DraftRenderer

      public DraftRenderer(ReleaseContext ctx)
      Creates a new draft renderer bound to the given context.
      Parameters:
      ctx - the per-invocation release context
  • Method Details

    • render

      public GoalReportSpec render(PrepOutcome prep, Path startDirPath, String oldVersion, String releaseBranch)
      Renders the draft-mode preview and returns the GoalReportSpec for the ike:release-draft goal.
      Parameters:
      prep - the prep outcome with projectId and releaseTimestamp
      startDirPath - the working directory the goal was invoked from (used as the report's start dir)
      oldVersion - the pre-release POM version
      releaseBranch - the release/<version> branch that would be created
      Returns:
      the GoalReportSpec describing the draft run