Class 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 AbstractActPerModuleMojo
Maven goal 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
 
  • Constructor Details

    • ActPerModuleMojo

      public ActPerModuleMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Executes the configured action for the current reactor module.

      The action value is inherited from AbstractActMojo. This method passes that value unchanged to AbstractActPerModuleMojo.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 error
      org.apache.maven.plugin.MojoFailureException - if the action completes with a reported failure