Class BindexMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.machanism.machai.gw.maven.AbstractGWMojo
org.machanism.machai.gw.maven.AbstractActMojo
org.machanism.machai.bindex.maven.BindexMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
RegisterMojo

@Mojo(name="bindex", aggregator=true, threadSafe=true, requiresProject=false, requiresDependencyResolution=COMPILE_PLUS_RUNTIME) public class BindexMojo extends org.machanism.machai.gw.maven.AbstractActMojo
Aggregated Maven goal that generates Bindex metadata for the current Maven reactor.

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, prompter

    Fields inherited from class org.machanism.machai.gw.maven.AbstractGWMojo

    basedir, classFunctionTools, configFile, excludes, instructions, model, params, path, project, serverId, SERVERID_PROP_NAME, session, settings

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the aggregated Bindex goal.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the aggregated Bindex workflow.
    void
    setBasedir(File basedir)
    Sets the base directory from which the workflow resolves relative paths.
    void
    setConfigFile(File configFile)
    Sets an optional workflow configuration file.
    void
    setExcludes(String[] excludes)
    Sets path patterns that the workflow must exclude from processing.
    void
    setInstructions(String instructions)
    Sets additional instructions passed to the Bindex workflow.
    void
    Selects the AI model used by the Bindex workflow.
    void
    Sets arbitrary workflow parameters declared in the plugin configuration.
    void
    setProject(org.apache.maven.project.MavenProject project)
    Supplies the project associated with the Maven invocation.
    void
    setServerId(String serverId)
    Selects the Maven server entry containing credentials for the workflow.
    void
    setSession(org.apache.maven.execution.MavenSession session)
    Supplies the Maven session associated with this goal execution.
    void
    setSettings(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, updateMavenProjectLayout

    Methods inherited from class org.machanism.machai.gw.maven.AbstractGWMojo

    applyExcludes, getConfiguration, scanDocuments, setPath

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.MojoExecutionException
      Executes the aggregated Bindex workflow.

      This implementation delegates to the shared Act executor with the bindex Act 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:
      setSettings in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      settings - effective settings supplied by Maven; may be null when 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:
      setSession in class org.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:
      setProject in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      project - current Maven project, or null when no project is associated with the invocation
    • setBasedir

      @Parameter(defaultValue="${basedir}", required=true) public void setBasedir(File basedir)
      Sets the base directory from which the workflow resolves relative paths.
      Overrides:
      setBasedir in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      basedir - Maven invocation base directory; required for goal execution
    • setConfigFile

      @Parameter(property="gw.config", required=false) public void setConfigFile(File configFile)
      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:
      setConfigFile in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      configFile - optional configuration file, or null to use the workflow's normal configuration resolution
    • setModel

      @Parameter(property="gw.model") public void setModel(String model)
      Selects the AI model used by the Bindex workflow.
      Overrides:
      setModel in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      model - model identifier, or null to 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:
      setInstructions in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      instructions - supplemental workflow instructions, or null if no additional instructions are configured
    • setExcludes

      @Parameter(property="gw.excludes", name="excludes") public void setExcludes(String[] excludes)
      Sets path patterns that the workflow must exclude from processing.
      Overrides:
      setExcludes in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      excludes - exclusion patterns, or null when no exclusions are configured
    • setServerId

      @Parameter(property="genai.serverId", required=false) public void setServerId(String serverId)
      Selects the Maven server entry containing credentials for the workflow.
      Overrides:
      setServerId in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      serverId - Maven settings.xml server identifier, or null when no server entry is selected explicitly
    • setParams

      @Parameter public void setParams(Map<String,String> params)
      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:
      setParams in class org.machanism.machai.gw.maven.AbstractGWMojo
      Parameters:
      params - parameter names and values, or null when no extra parameters are configured