Class ActPerModuleMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
gw:act-per-module that runs an action for an eligible
project in Maven's standard reactor build context.
Unlike ActMojo, which is an aggregator and can discover and scan
modules itself, this non-aggregating goal executes during a reactor build.
It delegates eligibility checks, prompt resolution, and document scanning to
AbstractActPerModuleMojo and 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.AbstractActMojo
act, prompterFields inherited from class org.machanism.machai.gw.maven.AbstractGWMojo
basedir, classFunctionTools, configFile, excludes, instructions, logger, model, params, path, project, serverId, SERVERID_PROP_NAME, session, settingsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the configured action for the current reactor module.Methods inherited from class org.machanism.machai.gw.maven.AbstractActPerModuleMojo
performAct, scanDocumentsMethods inherited from class org.machanism.machai.gw.maven.AbstractActMojo
applyActPrompt, configureAndScan, getPrompter, process, readText, setPrompter, updateMavenProjectLayoutMethods inherited from class org.machanism.machai.gw.maven.AbstractGWMojo
getConfiguration, scanDocuments, setBasedir, setConfigFile, setExcludes, setInstructions, setModel, setParams, setPath, setProject, setServerId, setSession, setSettingsMethods 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.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionExecutes the configured action for the current reactor module.The action value is inherited from
AbstractActMojo. This method passes that value unchanged toAbstractActPerModuleMojo.performAct(String), which resolves a prompt when necessary and performs the module-aware processing. The inherited action value is therefore the sole input handled directly by this method; all module eligibility and document-processing decisions are delegated to the superclass.- Throws:
org.apache.maven.plugin.MojoExecutionException- if the action cannot be executed because of an unrecoverable execution errororg.apache.maven.plugin.MojoFailureException- if the action completes with a reported failure
-