Class BindexMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
RegisterMojo
The goal delegates its work to the bindex Machai Act. As an
aggregator mojo, it is invoked once for the build rather than once for every
module. The inherited Act infrastructure makes Maven settings, session,
project context, configuration, and additional parameters available to that
workflow.
Typical command-line usage is mvn bindex:bindex. The goal may also
be configured in a build and supplied with workflow-specific parameters by
using its Maven plugin configuration.
- 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 aggregated Bindex workflow.voidsetBasedir(File basedir) Sets the base directory from which the workflow resolves relative paths.voidsetConfigFile(File configFile) Sets an optional workflow configuration file.voidsetExcludes(String[] excludes) Sets path patterns that the workflow must exclude from processing.voidsetInstructions(String instructions) Sets additional instructions passed to the Bindex workflow.voidSelects the AI model used by the Bindex workflow.voidSets arbitrary workflow parameters declared in the plugin configuration.voidsetProject(org.apache.maven.project.MavenProject project) Supplies the project associated with the Maven invocation.voidsetServerId(String serverId) Selects the Maven server entry containing credentials for the workflow.voidsetSession(org.apache.maven.execution.MavenSession session) Supplies the Maven session associated with this goal execution.voidsetSettings(org.apache.maven.settings.Settings settings) Supplies the effective Maven settings for the current invocation.Methods inherited from class org.machanism.machai.gw.maven.AbstractActMojo
applyActPrompt, configureAndScan, getPrompter, performAct, process, readText, scanDocuments, 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
-
BindexMojo
public BindexMojo()Creates the aggregated Bindex goal.Maven instantiates mojos reflectively. Configuration values are supplied afterwards through the annotated setter methods.
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionExecutes the aggregated Bindex workflow.This implementation delegates to the shared Act executor with the
bindexAct name. The inherited implementation prepares the Maven context and applies the configured workflow settings.- Throws:
org.apache.maven.plugin.MojoExecutionException- if the workflow cannot be prepared or executed successfully
-
setSettings
@Parameter(readonly=true, defaultValue="${settings}") public void setSettings(org.apache.maven.settings.Settings settings) Supplies the effective Maven settings for the current invocation.The inherited workflow infrastructure uses these settings to resolve server credentials and other user-level Maven configuration required by the Bindex workflow.
- 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 Maven session associated with this goal execution.The session exposes reactor projects and execution state needed when the aggregated workflow discovers and processes project metadata.
- 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 project associated with the Maven invocation.Although this aggregator goal can run without a project, Maven supplies the current project when one is available so that the workflow can use its coordinates and build context.
- Overrides:
setProjectin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
project- current Maven project, ornullwhen no project is associated with the invocation
-
setBasedir
Sets the base directory from which the workflow resolves relative paths.- Overrides:
setBasedirin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
basedir- Maven invocation base directory; required for goal execution
-
setConfigFile
Sets an optional workflow configuration file.When present, the file is forwarded to the shared Machai workflow infrastructure to provide configuration in addition to Maven parameters.
- 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 allow the workflow to use its configured default
-
setInstructions
@Parameter(property="gw.instructions", name="instructions") public void setInstructions(String instructions) Sets additional instructions passed to the Bindex workflow.- Overrides:
setInstructionsin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
instructions- supplemental workflow instructions, ornullif no additional instructions are configured
-
setExcludes
Sets path patterns that the workflow must exclude from processing.- Overrides:
setExcludesin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
excludes- exclusion patterns, ornullwhen no exclusions are configured
-
setServerId
Selects the Maven server entry containing credentials for the workflow.- Overrides:
setServerIdin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
serverId- Mavensettings.xmlserver identifier, ornullwhen no server entry is selected explicitly
-
setParams
Sets arbitrary workflow parameters declared in the plugin configuration.Entries are passed unchanged to the Machai workflow, allowing an Act to consume configuration that is not represented by a dedicated mojo parameter.
- Overrides:
setParamsin classorg.machanism.machai.gw.maven.AbstractGWMojo- Parameters:
params- parameter names and values, ornullwhen no extra parameters are configured
-