Class BindexPerModuleMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.machanism.machai.gw.maven.AbstractGWMojo
org.machanism.machai.gw.maven.AbstractActMojo
org.machanism.machai.gw.maven.AbstractActPerModuleMojo
org.machanism.machai.bindex.maven.BindexPerModuleMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
RegisterPerModuleMojo
@Mojo(name="bindex-per-module",
aggregator=false,
threadSafe=true,
requiresProject=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class BindexPerModuleMojo
extends org.machanism.machai.gw.maven.AbstractActPerModuleMojo
Maven goal that generates Bindex metadata in the context of each module in a
multi-module reactor.
Unlike BindexMojo, this non-aggregating goal is invoked separately
for every Maven project to which it is bound. It delegates to the
bindex Machai Act after the inherited per-module infrastructure has
prepared the current project, reactor session, settings, and configured
workflow parameters.
Use this goal when Bindex generation must be associated with individual
module execution, for example through mvn bindex:bindex-per-module.
Use BindexMojo instead when one reactor-wide invocation is desired.
- Since:
- 1.0
-
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, 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 Bindex workflow for the current Maven module.voidsetBasedir(File basedir) Sets the module base directory used to resolve workflow-relative paths.voidsetConfigFile(File configFile) Sets an optional workflow configuration file.voidsetExcludes(String[] excludes) Sets path patterns that the workflow must skip for the current module.voidsetInstructions(String instructions) Sets supplemental instructions passed to the Bindex workflow.voidSelects the AI model used by the Bindex workflow.voidSets arbitrary parameters to forward unchanged to the Machai Act.voidsetProject(org.apache.maven.project.MavenProject project) Supplies the Maven project for the module currently being processed.voidsetServerId(String serverId) Selects the Maven server entry that supplies workflow credentials.voidsetSession(org.apache.maven.execution.MavenSession session) Supplies the active Maven session, including reactor execution context.voidsetSettings(org.apache.maven.settings.Settings settings) Supplies the effective Maven settings for this module execution.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
applyExcludes, getConfiguration, scanDocuments, setPathMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
BindexPerModuleMojo
public BindexPerModuleMojo()Creates the per-module Bindex goal.Maven instantiates the mojo reflectively and injects the annotated parameters before execution.
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionExecutes the Bindex workflow for the current Maven module.- Throws:
org.apache.maven.plugin.MojoExecutionException- if the workflow cannot be prepared or executed successfullyorg.apache.maven.plugin.MojoFailureException- if the workflow reports a build failure that is not an execution error
-
setSettings
@Parameter(readonly=true, defaultValue="${settings}") public void setSettings(org.apache.maven.settings.Settings settings) Supplies the effective Maven settings for this module execution.- Overrides:
setSettingsin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
settings- effective settings supplied by Maven; may benullwhen Maven does not provide settings
-
setSession
@Parameter(defaultValue="${session}", readonly=true, required=true) public void setSession(org.apache.maven.execution.MavenSession session) Supplies the active Maven session, including reactor execution context.- Overrides:
setSessionin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
session- active Maven session supplied by Maven; required for goal execution
-
setProject
@Parameter(readonly=true, defaultValue="${project}") public void setProject(org.apache.maven.project.MavenProject project) Supplies the Maven project for the module currently being processed.- Overrides:
setProjectin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
project- current Maven project; required because this goal executes per module
-
setBasedir
Sets the module base directory used to resolve workflow-relative paths.- Overrides:
setBasedirin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
basedir- base directory of the current Maven invocation; required for goal execution
-
setConfigFile
Sets an optional workflow configuration file.- Overrides:
setConfigFilein classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
configFile- optional configuration file, ornullto use the workflow's normal configuration resolution
-
setModel
Selects the AI model used by the Bindex workflow.- Overrides:
setModelin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
model- model identifier, ornullto use the workflow's configured default
-
setInstructions
@Parameter(property="gw.instructions", name="instructions") public void setInstructions(String instructions) Sets supplemental instructions passed to the Bindex workflow.- Overrides:
setInstructionsin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
instructions- additional workflow instructions, ornullwhen none are configured
-
setExcludes
Sets path patterns that the workflow must skip for the current module.- Overrides:
setExcludesin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
excludes- exclusion patterns, ornullwhen no exclusions are configured
-
setServerId
Selects the Maven server entry that supplies workflow credentials.- Overrides:
setServerIdin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
serverId- Mavensettings.xmlserver identifier, ornullwhen no server entry is selected explicitly
-
setParams
Sets arbitrary parameters to forward unchanged to the Machai Act.- Overrides:
setParamsin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
params- parameter names and values, ornullwhen no extra parameters are configured
-