Class CentralPhase
Stages signed artifacts to a local staging-deploy
directory then uploads them via JReleaser to the Sonatype Central
Portal. Retried per ike.deploy.central.{maxAttempts,backoffSeconds}.
Central failure is best-effort and does not throw: Nexus already
has the artifact by the time this runs, so the team is unblocked
and tag/main push and the GitHub Release proceed regardless.
execute() returns a CompletableFuture per the
Phase 4 decision §1.1 — the standalone mojo joins the future
immediately to preserve today's blocking semantics; the Phase 5
orchestrator forks it as a subtask alongside FinalizePhase
under a single StructuredTaskScope.
The detached async-bash spawn path
(ReleaseDraftMojo.spawnCentralDeployAsync) remains on the
mojo for now and is the wedge that Phase 5 replaces with
structured concurrency; this class covers only the sync deploy path.
Carved out of ReleaseDraftMojo.deployToMavenCentralWithRetry()
and deployToMavenCentralCore() during the Phase 4 Commit 3
(IKE-Network/ike-issues#489).
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new Central phase bound to the given context. -
Method Summary
-
Constructor Details
-
CentralPhase
Creates a new Central phase bound to the given context.- Parameters:
ctx- the per-invocation release context
-
-
Method Details
-
execute
Executes the Maven Central deploy with retry.Retry parameters are read from
ctx.request():ReleaseRequest.centralDeployMaxAttempts()andReleaseRequest.centralDeployBackoffSeconds(). The caller is responsible for skip-decision logic (skipCentralDeploy, missing credentials,centralDeployAsyncrouting); this method runs the sync deploy unconditionally when invoked.Returns a
CompletableFuture.completedFuture(U)-wrapped outcome. The future never completes exceptionally — exhausted retries are surfaced throughCentralOutcome.failureSummary()with the failure logged as a warning. The release continues to tag/main push regardless of Central's outcome (Nexus has the artifact; team is unblocked).- Returns:
- a completed future carrying the
CentralOutcome
-