Package org.machanism.machai.gw.maven
Class ActPerModuleMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.machanism.machai.gw.maven.AbstractGWMojo
org.machanism.machai.gw.maven.ActMojo
org.machanism.machai.gw.maven.ActPerModuleMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="act-per-module",
aggregator=false,
threadSafe=true,
requiresProject=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class ActPerModuleMojo
extends ActMojo
Maven goal Inherited parameters (from
Inherited parameters (from
gw:act-per-module that runs an action against the
execution-root project using Maven's standard reactor build context.
Unlike ActMojo (which is an aggregator and can discover/scan modules
itself), this goal executes as part of a standard reactor build. It typically
targets the execution-root project only and delegates the scan to
ActProcessor.
Parameters
This goal does not introduce additional parameters beyond those supported by
ActMojo and AbstractGWMojo.
Inherited parameters (from ActMojo)
-Dgw.act/<act>- Action text/prompt to apply. If omitted, the goal reads it interactively.
-Dgw.acts/<acts>- Optional directory containing predefined action definitions.
Inherited parameters (from AbstractGWMojo)
-Dgw.model/<model>- Provider/model identifier forwarded to the workflow. Example:
openai:gpt-4o-mini. -Dgw.path/<path>- Optional scan root override. When omitted, defaults to the execution-root directory.
-Dgw.excludes/<excludes>- Exclude patterns/path to skip while scanning documentation sources.
-Dgenai.serverId/<serverId>settings.xml<server>id used to read GenAI credentials.
Usage examples
mvn gw:act-per-module
mvn gw:act-per-module -Dgw.act="Rewrite headings" -Dgw.path=src\\site
-
Field Summary
Fields inherited from class org.machanism.machai.gw.maven.AbstractGWMojo
basedir, classFunctionTools, excludes, instructions, logger, model, path, project, reactorProjects, sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the configured act goal.protected voidscanDocuments(ActProcessor actProcessor) Scans the resolved project path with the configured act processor.Methods inherited from class org.machanism.machai.gw.maven.ActMojo
applyActPrompt, configureAndScan, process, readTextMethods inherited from class org.machanism.machai.gw.maven.AbstractGWMojo
getConfiguration, scanDocumentsMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
ActPerModuleMojo
public ActPerModuleMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:ActMojoExecutes the configured act goal.The method creates and configures an
ActProcessor, resolves Maven and Ghostwriter configuration values, applies inherited parameters such as path, model, instructions, excludes, and interactive mode, and then scans the selected documents. A zero-codeProcessTerminationExceptionis treated as normal termination. -
scanDocuments
Description copied from class:ActMojoScans the resolved project path with the configured act processor.- Overrides:
scanDocumentsin classActMojo- Parameters:
actProcessor- the processor used to scan documents- Throws:
IOException- if reading or writing project files fails
-