Class PostMutationSync
Currently one derivation:
YamlDepsSync— re-derives each subproject'sdepends-onedges from POM contents and rewritesworkspace.yamlwhen the graph has drifted.
Earlier revisions also ran IdeProfileSync here to
maintain a -P?with-* block in .mvn/maven.config
(IKE-Network/ike-issues#276), so IntelliJ would activate the
with-* profiles that scoped subprojects into the reactor.
That whole mechanism was retired in
IKE-Network/ike-issues#460: the
ike-workspace-extension prunes non-existent
<subprojects> from workspace POMs at model-read time, so
IntelliJ sees the right reactor without any profile activation.
The step is idempotent — running this hook back-to-back produces no further changes. Failures are logged at WARN and do not abort the caller.
Self-committing. workspace.yaml is machine-maintained,
never hand-authored, so a re-derivation it produces must not be left as
an uncommitted working-tree change — that strands the change for the
next goal's clean-tree preflight to trip over (the reported failure mode
in IKE-Network/ike-issues#774: ws:commit re-derived
depends-on edges after its commit loop, and the next
ws:push/ws:sync then refused to run). When the
re-derivation is the sole pending change to workspace.yaml
— i.e. the manifest was committed-clean when the hook ran — it is
committed here in isolation. When the manifest already carried a
caller's own edit (e.g. ws:add adding a subproject, which
deliberately leaves the manifest staged for the user), the combined
change is left for that caller's own commit policy and this hook does
not commit.
Triggered from: ws:add, ws:remove, ws:sync,
ws:pull, ws:commit-publish, ws:scaffold-init,
ws:feature-finish-merge-publish,
ws:feature-finish-squash-publish,
ws:align-publish, ws:scaffold-publish
(which subsumes the retired ws:set-parent).
See IKE-Network/ike-issues#279 (origin) and
IKE-Network/ike-issues#460 (IdeProfileSync retirement).
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanRun all post-mutation derivations against the workspace atworkspaceRoot, committing a re-derivedworkspace.yamlin isolation when it is the sole pending change (see the class note on self-committing).
-
Method Details
-
refresh
Run all post-mutation derivations against the workspace atworkspaceRoot, committing a re-derivedworkspace.yamlin isolation when it is the sole pending change (see the class note on self-committing).- Parameters:
workspaceRoot- the workspace root directorylog- plugin log for status messages- Returns:
trueif a re-derivedworkspace.yamlwas committed by this call;falseif nothing changed or the change was left for the caller to commit
-