Class ParentVersionReconciler

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

public class ParentVersionReconciler extends Object implements Reconciler
Reconciler that cascades the workspace root POM's <parent> version across every cloned subproject (and any nested submodule POMs whose parent block matches the same groupId:artifactId).

Subsumes the retired ws:set-parent-{draft,publish} goals (IKE-Network/ike-issues#393). The source of truth for the target parent version is the workspace root POM's <parent><version>. To pin to a specific (non-root-declared) version, pass -DparentVersion=<v>; the reconciler then also updates the root POM before cascading.

External-trigger drift dimension: a new ike-parent release lands → the user updates the root POM (or passes -DparentVersion=) → next scaffold-publish cascades to every subproject.

  • Constructor Details

    • ParentVersionReconciler

      public ParentVersionReconciler()
  • 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"
    • pinFlag

      public String pinFlag()
      Description copied from interface: Reconciler
      The Maven property name (without the -D prefix) that pins this reconciler to a specific value, overriding the default "move to latest" behavior. Reconcilers that do not support pinning (e.g., pure normalizers like field-sync) return null.
      Specified by:
      pinFlag in interface Reconciler
      Returns:
      the pin flag name, or null if pinning is not supported
    • 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