Class DeployedSiteReconciler

java.lang.Object
network.ike.plugin.reconcile.DeployedSiteReconciler
All Implemented Interfaces:
SiteReconciler

public class DeployedSiteReconciler extends Object implements SiteReconciler
Reconciler that keeps the project's deployed Maven site in sync with the current POM version.

Subsumes the retired ike:deploy-site-{draft,publish} goals (IKE-Network/ike-issues#398). The deployed site lives at https://ike.network/<artifactId>/ (served from the project's own gh-pages branch) with a versioned mirror at .../<artifactId>/<version>/ and a .../<artifactId>/latest/ alias.

Detect: probe https://ike.network/<artifactId>/ and inspect the rendered HTML for the deployed version. If the version tag is missing or differs from SiteContext.projectVersion, report drift.

Apply: run mvnw site site:stage and force-push the resulting target/staging/ to the project repo's gh-pages branch via ReleaseSupport.publishProjectSiteToGhPages(Path, String, Log, String, String). This is the same publish path the retired DeploySiteDraftMojo used for siteType=release after #304 retired the scpexe mirror.

Uninstall: this reconciler does not invert. Removing a deployed site is handled by the gh-pages branch being deleted at the GitHub repo level — not something the build can do safely. The paired StaleSiteCleanupReconciler handles legacy scpexe cleanup.

  • Constructor Details

    • DeployedSiteReconciler

      public DeployedSiteReconciler()
      Creates this reconciler instance.
  • Method Details

    • dimension

      public String dimension()
      Description copied from interface: SiteReconciler
      Human-readable name of the dimension this reconciler owns. Used as the heading in site-draft output.
      Specified by:
      dimension in interface SiteReconciler
      Returns:
      the dimension label, e.g. "Deployed site version"
    • optOutFlag

      public String optOutFlag()
      Description copied from interface: SiteReconciler
      The Maven property name (without the -D prefix) that opts out of this reconciler's apply pass. Setting the property to "false" skips this dimension on a given site-publish invocation.
      Specified by:
      optOutFlag in interface SiteReconciler
      Returns:
      the opt-out flag name, e.g. "updateSite"
    • detect

      public SiteDriftReport detect(SiteContext ctx)
      Description copied from interface: SiteReconciler
      Inspect deployed site state and report any drift this reconciler would correct. Read-only — must not mutate any remote state.
      Specified by:
      detect in interface SiteReconciler
      Parameters:
      ctx - the per-repo site context
      Returns:
      drift report; SiteDriftReport.noDrift(String) if nothing to do
    • apply

      public void apply(SiteContext ctx)
      Description copied from interface: SiteReconciler
      Apply reconciliation. Caller is responsible for checking SiteReconcilerOptions.isOptedOut(String) before invoking; implementations may also re-check defensively.
      Specified by:
      apply in interface SiteReconciler
      Parameters:
      ctx - the per-repo site context