Class WorkspaceReport

java.lang.Object
network.ike.plugin.ws.WorkspaceReport

public final class WorkspaceReport extends Object
Per-goal report writer for ws:* goals.

Each goal writes its own file directly at the workspace root (alongside workspace.yaml and the aggregator pom.xml). Files are overwritten on each run (not appended), so the content always reflects the latest execution.

Filenames use ꞉ (U+A789 MODIFIER LETTER COLON) to cluster visually as ws꞉goal-name.md in IDE file browsers. For draft/publish goals, the filename includes the variant: ws꞉feature-start-draft.md, ws꞉feature-start-publish.md.

Kept out of git without touching the tree: before writing, this class checks that ws꞉*.md is listed in the .gitignore of the nearest .git ancestor. The committed glob is the scaffold convention's business (the workspace reconciler commits it); when it is missing, the pattern goes into the repository's local .git/info/exclude, which git honours and never tracks, so a report never leaves an uncommitted change behind for the next publish to refuse (IKE-Network/ike-issues#1283, #1109). A fresh clone becomes report-ready the first time a ws:* goal runs, either way.

Parallels network.ike.plugin.IkeReport in the ike plugin; both writers now target their respective project roots.

  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    openInBrowser(Path workspaceRoot, org.apache.maven.api.plugin.Log log)
    Open the workspace root in the default file manager or IDE so the user can browse the ws꞉*.md reports alongside workspace.yaml and the aggregator pom.xml.
    static Path
    reportPath(Path workspaceRoot, String goalName)
    Resolve the report file path for a specific goal.
    static void
    write(Path workspaceRoot, String goalName, String content, org.apache.maven.api.plugin.Log log)
    Write a goal's report to its per-goal file at the working set's root, overwriting any previous content, and keep it out of git without modifying the tracked tree (see ensureGitignored(Path, Log)).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • write

      public static void write(Path workspaceRoot, String goalName, String content, org.apache.maven.api.plugin.Log log)
      Write a goal's report to its per-goal file at the working set's root, overwriting any previous content, and keep it out of git without modifying the tracked tree (see ensureGitignored(Path, Log)).
      Parameters:
      workspaceRoot - the working set's root: the workspace root, or the repository in a working set of one
      goalName - the goal name including variant (e.g., "ws:feature-start-draft")
      content - the markdown content to write
      log - Maven logger (warnings only; null-safe)
    • reportPath

      public static Path reportPath(Path workspaceRoot, String goalName)
      Resolve the report file path for a specific goal.
      Parameters:
      workspaceRoot - the workspace root directory
      goalName - the goal name (e.g., "ws:overview")
      Returns:
      path to the report file at the workspace root (may not exist yet)
    • openInBrowser

      public static boolean openInBrowser(Path workspaceRoot, org.apache.maven.api.plugin.Log log)
      Open the workspace root in the default file manager or IDE so the user can browse the ws꞉*.md reports alongside workspace.yaml and the aggregator pom.xml.
      Parameters:
      workspaceRoot - the workspace root directory
      log - Maven logger
      Returns:
      true if opened successfully