Class WorkspaceBootstrap
java.lang.Object
network.ike.plugin.ws.bootstrap.WorkspaceBootstrap
Generates the on-disk scaffold for a brand-new IKE workspace.
Subsumes the file-generation half of the retired
WsCreateMojo (folded into ws:scaffold-init per
IKE-Network/ike-issues#393): given a target directory and a small
parameter bag, writes the standard workspace files
(pom.xml, workspace.yaml, .gitignore,
.mvn/maven.config, .mvn/jvm.config,
README.adoc) and installs the Maven wrapper via
MavenWrapper.writeMissingFiles(Path, String).
The generated files follow current IKE conventions:
- POM uses Maven 4.1.0 model with
root="true" - .gitignore uses whitelist strategy (ignore everything, whitelist workspace-owned files)
- workspace.yaml has schema-version 1.1 with a typed
workspace-root:block holding the workspace's GAV (ike-issues#183) and an emptysubprojects:list - .mvn/maven.config sets
-T 1C
This class is a pure scaffold writer — it does not consult
workspace.yaml (none exists yet), does not iterate
subprojects, and never extends AbstractWorkspaceMojo.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordParameters captured from the user-facing mojo. -
Constructor Summary
ConstructorsConstructorDescriptionWorkspaceBootstrap(WorkspaceBootstrap.Params params, org.apache.maven.api.plugin.Log log) Create a workspace bootstrapper bound to a parameter bag and a logger. -
Method Summary
-
Constructor Details
-
WorkspaceBootstrap
Create a workspace bootstrapper bound to a parameter bag and a logger. Construction is cheap; the actual filesystem writes happen increateAt(Path).- Parameters:
params- the resolved create-time parameterslog- the mojo logger
-
-
Method Details
-
createAt
Write the full workspace scaffold intowsDirand optionally initialize git. The directory must not already containpom.xmlorworkspace.yaml; the caller is responsible for that pre-check.- Parameters:
wsDir- the workspace directory to populate- Throws:
org.apache.maven.api.plugin.MojoException- on file or git failures
-