Class GWMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
gw:gw that runs Ghostwriter guided file processing for a
project.
This goal is an aggregator and can be executed even when a pom.xml is
not present in the current directory (it sets requiresProject=false).
Processing order
The gw:gw goal processes files in reverse order, similar to the
Ghostwriter CLI: sub-modules are processed first, followed by parent modules.
For more details, see:
Guided
file processing.
Parameters
This goal defines the following parameter in addition to those inherited from
AbstractGWMojo.
-Dgw.threads/<threads>- Enables or disables multi-threaded module processing.
Default:
false
Inherited parameters (from AbstractGWMojo)
The following parameters are defined on AbstractGWMojo and are
available to this goal. Refer to AbstractGWMojo for the authoritative
list and exact semantics.
-Dgw.model/<model>- Provider/model identifier forwarded to the workflow. Example:
openai:gpt-4o-mini. -Dgw.scanDir/<scanDir>- Optional scan root override. When omitted, defaults to the execution root directory.
-Dgw.instructions/<instructions>- Instruction locations (for example, file paths or classpath locations) consumed by the workflow.
-Dgw.excludes/<excludes>- Exclude patterns/paths to skip when scanning documentation sources.
-Dgenai.serverId/<serverId>settings.xml<server>id used to read GenAI credentials.-DlogInputs/<logInputs>- Whether to log the list of input files passed to the workflow.
Default:
false
Usage examples
Run in the current directory:
mvn gw:gw
Run without a pom.xml (this goal sets requiresProject=false):
cd path\\to\\project mvn gw:gw
Enable multi-threaded processing:
mvn gw:gw -Dgw.threads=true
Disable multi-threaded processing (default):
mvn gw:gw -Dgw.threads=false
Run against a specific module:
mvn -pl :my-module gw:gw
- See Also:
-
Field Summary
Fields inherited from class org.machanism.machai.gw.maven.AbstractGWMojo
basedir, classFunctionTools, excludes, instructions, logger, logInputs, model, project, reactorProjects, scanDir, sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods 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
-
GWMojo
public GWMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-