Class ReactorSubprojectsReconciler

java.lang.Object
network.ike.plugin.ws.reconcile.ReactorSubprojectsReconciler
All Implemented Interfaces:
Reconciler

public class ReactorSubprojectsReconciler extends Object implements Reconciler
Reconciler that keeps the workspace reactor POM's subproject membership in lockstep with workspace.yaml, and migrates the legacy with-<name> file-activated profile pattern to unconditional top-level <subprojects> entries (IKE-Network/ike-issues#696, completing #460).

Before this reconciler, the only path that added a member to the reactor POM was ws:add, one profile at a time. A subproject that entered workspace.yaml by any other route — feature-finish YAML reconciliation, bulk import, a hand edit — silently dropped out of the reactor, and IntelliJ (which imports the workspace root) never saw it. There was no convergence step to catch the drift.

Each ws:scaffold-{draft,publish} run now converges the reactor POM to:

  1. a top-level <subprojects> block listing exactly the workspace.yaml keys, in declaration order — adding the missing, removing the stale; and
  2. zero with-* subproject profiles — every one is retired, its member already declared top-level.

Top-level declarations are safe even for not-yet-cloned subprojects: ike-workspace-extension's SubprojectPruneTransformer prunes entries whose directory is absent at model-read time (#460).

Pure normalization — no version bumps, no clones. detect reports the convergence; apply performs it. Idempotent: a second run is a no-op. Opt out with -DupdateReactor=false.

See Also:
  • Constructor Details

    • ReactorSubprojectsReconciler

      public ReactorSubprojectsReconciler()
      Creates the reconciler.
  • Method Details

    • dimension

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

      public String optOutFlag()
      Description copied from interface: Reconciler
      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 scaffold-publish invocation.
      Specified by:
      optOutFlag in interface Reconciler
      Returns:
      the opt-out flag name, e.g. "updateFields"
    • detect

      public DriftReport detect(WorkspaceContext ctx)
      Description copied from interface: Reconciler
      Inspect the workspace and report any drift this reconciler would correct. Read-only — must not mutate the workspace.
      Specified by:
      detect in interface Reconciler
      Parameters:
      ctx - the workspace context
      Returns:
      drift report; DriftReport.noDrift(String) if nothing to do
    • apply

      public void apply(WorkspaceContext ctx)
      Description copied from interface: Reconciler
      Apply reconciliation. Caller is responsible for checking ReconcilerOptions.isOptedOut(String) before invoking; implementations may also re-check defensively.
      Specified by:
      apply in interface Reconciler
      Parameters:
      ctx - the workspace context