Enum Class PreflightCondition
- All Implemented Interfaces:
Serializable, Comparable<PreflightCondition>, Constable
ws:* goals can
require before they mutate workspace state. Each entry declares a
human-readable description and a check(PreflightContext)
implementation that returns Optional.empty() on success or a
remediation message on failure.
Drafts and publishes invoke the same PreflightCondition
sequence via Preflight; whether failure is a warning (draft)
or a hard error (publish) is decided at the call site via
PreflightResult.requirePassed(WsGoal) vs
PreflightResult.warnIfFailed(Log, WsGoal).
New conditions are added here as goals adopt the contract from
issue #154. Each new entry must stay self-contained: it does not
depend on the mojo instance, only on the shared PreflightContext.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo.mvn/jvm.configfile in the workspace root or any subproject may contain a line starting with#.No subproject's<properties>block may declare a locally-overriding value for any IKE-foundation property name (#346, surfaced by theits/pom property-shadowing in the v150 cascade).No on-disk gh-pages-style site output leaks at<projectDir>/<artifactId>/<artifactId>/index.html— whether or not git tracks them.No subproject root POM (nor the workspace root) declares a<distributionManagement><site><url>starting withscpexe://— that wagon was retired in ike-issues#304 in favor of the GitHub Pages publish path (https://ike.network/<repo>/via the org CNAME).No<properties>entry in any subproject root POM may hold a value ending in-SNAPSHOT.Every workspace subproject's root POM must either declare<distributionManagement>locally or have a<parent>block to inherit from (#346, surfaced by #343 whenits/was missing both).Every subproject working tree (and the workspace root itself, if it is a git repo) must have no uncommitted changes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSpecial marker used when the workspace root itself has uncommitted changes. -
Method Summary
Modifier and TypeMethodDescriptioncheck(PreflightContext ctx) Evaluate the condition against the given context.Short human description of what this condition enforces.static PreflightConditionReturns the enum constant of this class with the specified name.static PreflightCondition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WORKING_TREE_CLEAN
Every subproject working tree (and the workspace root itself, if it is a git repo) must have no uncommitted changes. Any draft or publish goal that creates branches, edits POMs, or otherwise mutates files requires this. -
NO_SNAPSHOT_PROPERTIES
No<properties>entry in any subproject root POM may hold a value ending in-SNAPSHOT. Maven 4's consumer POM flattener resolves properties and promotes<pluginManagement>into<plugins>when writing the released artifact — a SNAPSHOT property value would then be baked in as a literal and break downstream consumers (e.g.<ike-tooling.version>112-SNAPSHOTleaking into releasedike-parent-105.pom). This check forces the release operator to bump the property to a released version before cutting the release. -
JVM_CONFIG_NO_HASH_COMMENTS
No.mvn/jvm.configfile in the workspace root or any subproject may contain a line starting with#.Maven parses
.mvn/jvm.configas raw JVM arguments — one token per line, with no comment syntax. A#at column 0 is passed to the JVM launcher as a main-class name and IntelliJ surfaces it asError: Could not find or load main class #. The fix is to delete the offending line; comments belong in.mvn/jvm.config.notesor similar adjacent files.This is the gate referenced in ike-issues#217. The check fires before the bad file can propagate to git or Syncthing — Maven's own
validatephase can't catch this in the project that contains the bad file because the JVM dies before plugin code runs. -
SUBPROJECT_HAS_DISTRIBUTION_MANAGEMENT
Every workspace subproject's root POM must either declare<distributionManagement>locally or have a<parent>block to inherit from (#346, surfaced by #343 whenits/was missing both).Site goals — specifically
site:stage, which the workspace release cascade runs — fail with "Missing distribution management in project ..." when neither is present. That failure surfaces deep inside the release flow, after some subprojects have already tagged. This preflight catches the missing declaration upfront so the release-draft is authoritative. -
NO_FOUNDATION_PROPERTY_SHADOWING
No subproject's<properties>block may declare a locally-overriding value for any IKE-foundation property name (#346, surfaced by theits/pom property-shadowing in the v150 cascade).Foundation properties (
ike-tooling.version,ike-docs.version,ike-platform.version) are set byike-parent's inheritance chain. Local overrides silently shadow the workspace's intended versions and pin plugins to old releases that may lack newer goals. Preferred discipline: namespace local overrides underit.*,local.*, or a project-specific prefix that doesn't collide with the foundation set. -
NO_ON_DISK_GHPAGES_LEAK
No on-disk gh-pages-style site output leaks at<projectDir>/<artifactId>/<artifactId>/index.html— whether or not git tracks them.Why this exists despite
WORKING_TREE_CLEANalready detecting committed leaks: once an operator adds.gitignoreentries (the standing workaround in ike-issues#358), the leak files are no longer reported bygit status, soWORKING_TREE_CLEANthinks the tree is clean — but the files keep getting regenerated under the working tree on every release flow. This check scans the filesystem directly so the operator sees the leak even when git has been told to ignore it.Pattern: a directory named exactly the same as a known cascade artifactId living inside another directory named the same, containing an
index.html— signature of anmvn siterender that escapedtarget/. We check both the workspace root (where workspace-root and subproject artifactIds can both shadow) and each subproject root. ike-issues#358. -
NO_SCPEXE_SITE_URLS
No subproject root POM (nor the workspace root) declares a<distributionManagement><site><url>starting withscpexe://— that wagon was retired in ike-issues#304 in favor of the GitHub Pages publish path (https://ike.network/<repo>/via the org CNAME).A surviving
scpexe://is a silent release-blocker: the goal that consumes the URL only fails at the step that tries to use the wagon, after subproject releases have already started. This check catches it at draft time so the operator fixes the URL before any tags ship.ike-issues#372.
-
PARENT_COHERENCE
-
-
Field Details
-
WORKSPACE_ROOT_NAME
Special marker used when the workspace root itself has uncommitted changes.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
description
Short human description of what this condition enforces. -
check
Evaluate the condition against the given context.- Parameters:
ctx- the preflight context- Returns:
Optional.empty()if the condition is satisfied; a remediation message otherwise
-