{
"$schema": "https://raw.githubusercontent.com/machanism-org/machai/refs/heads/main/bindex-core/src/main/resources/schema/bindex-schema-v2.json",
"id": "org.machanism.machai:bindex-maven-plugin:1.4.1",
"name": "org.machanism.machai:bindex-maven-plugin",
"version": "1.4.1",
"description": "Bindex Maven Plugin integrates Machai workflows with Apache Maven to generate and register structured Bindex metadata for semantic artifact discovery and GenAI-assisted integration. It provides four thread-safe Maven goals. The aggregator goals bindex and register execute once for an entire reactor and can run without a Maven project; bindex-per-module and register-per-module execute separately in each Maven module and require a project. Generation delegates to the bindex Machai Act, while registration delegates to bindex/register. Shared Ghostwriter configuration supports a workflow configuration file, AI model selection, supplemental instructions, excluded paths, Maven settings credentials selected by server ID, and arbitrary action-specific parameters. The plugin supports OpenAI, Anthropic, CodeMie, local tool-only YAML, and disabled provider modes through the underlying Machai GenAI client, making it suitable for automated documentation analysis, metadata generation, registry publication, and multi-module build pipelines.",
"authors": [
{
"name": "Viktor Tovstyi",
"email": "viktor.tovstyi@gmail.com",
"website": "https://machanism.org"
}
],
"license": "Apache License, Version 2.0",
"classification": {
"type": "Maven plugin",
"domains": [
"Build Automation",
"Artifact Metadata",
"Documentation Processing",
"Semantic Search",
"Generative AI",
"Multi-module Build Management"
],
"languages": [
{
"name": "Java",
"version": "17"
}
],
"layers": [
"Adapters",
"Infrastructure"
],
"usageContext": [
"Generate Bindex metadata from Maven project documentation",
"Generate one metadata document for a Maven reactor",
"Generate metadata independently for every reactor module",
"Register generated metadata with a configured Bindex registry",
"Use Maven settings server credentials for AI-assisted workflows",
"Run OpenAI, Anthropic, CodeMie, local tool-only, or disabled provider modes"
],
"targetEnvironment": [
"Java 17",
"Apache Maven 3.8.1 or later"
]
},
"constructors": [
{
"package": "org.machanism.machai.bindex.maven",
"signature": "public org.machanism.machai.bindex.maven.BindexMojo()",
"description": "Creates the reactor-wide Maven mojo for the bindex goal. Maven normally instantiates this class reflectively and injects the active session, project when available, settings, base directory, and workflow parameters.",
"examples": [
{
"snippet": "org.machanism.machai.bindex.maven.BindexMojo mojo = new org.machanism.machai.bindex.maven.BindexMojo();",
"description": "Shows the fully qualified Java type. In production, users invoke the Maven goal rather than constructing the mojo directly because Maven performs parameter injection."
}
]
},
{
"package": "org.machanism.machai.bindex.maven",
"signature": "public org.machanism.machai.bindex.maven.BindexPerModuleMojo()",
"description": "Creates the project-required, per-module Maven mojo for the bindex-per-module goal. Maven creates one execution in the context of each applicable reactor module.",
"examples": [
{
"snippet": "org.machanism.machai.bindex.maven.BindexPerModuleMojo mojo = new org.machanism.machai.bindex.maven.BindexPerModuleMojo();",
"description": "Shows the fully qualified implementation type; normal use is through the bindex-per-module Maven goal."
}
]
},
{
"package": "org.machanism.machai.bindex.maven",
"signature": "public org.machanism.machai.bindex.maven.RegisterMojo()",
"description": "Creates the reactor-wide Maven mojo that delegates metadata registration to the bindex/register Machai workflow.",
"examples": [
{
"snippet": "org.machanism.machai.bindex.maven.RegisterMojo mojo = new org.machanism.machai.bindex.maven.RegisterMojo();",
"description": "Identifies the fully qualified registration implementation. Maven users normally invoke the register goal."
}
]
},
{
"package": "org.machanism.machai.bindex.maven",
"signature": "public org.machanism.machai.bindex.maven.RegisterPerModuleMojo()",
"description": "Creates the project-required Maven mojo that registers Bindex metadata independently for the current reactor module.",
"examples": [
{
"snippet": "org.machanism.machai.bindex.maven.RegisterPerModuleMojo mojo = new org.machanism.machai.bindex.maven.RegisterPerModuleMojo();",
"description": "Identifies the fully qualified per-module registration implementation; Maven supplies its execution context."
}
]
}
],
"features": [
{
"package": "org.machanism.machai.bindex.maven",
"name": "bindex",
"signature": "public void org.machanism.machai.bindex.maven.BindexMojo.execute() throws org.apache.maven.plugin.MojoExecutionException",
"description": "Generates Bindex metadata once for the current Maven reactor by delegating to the bindex Machai Act. This goal is an aggregator, is thread-safe, can execute without a Maven project, and resolves compile and runtime dependencies.",
"examples": [
{
"snippet": "mvn org.machanism.machai:bindex-maven-plugin:1.4.1:bindex -Dgw.model=gpt-4o-mini -Dgenai.serverId=machai-genai",
"description": "Runs reactor-wide generation after credentials and workflow options have been configured. Maven instantiates org.machanism.machai.bindex.maven.BindexMojo."
}
]
},
{
"package": "org.machanism.machai.bindex.maven",
"name": "bindex-per-module",
"signature": "public void org.machanism.machai.bindex.maven.BindexPerModuleMojo.execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException",
"description": "Generates Bindex metadata separately for every applicable Maven module. This thread-safe non-aggregating goal requires a Maven project and passes the current module, reactor session, settings, and configured parameters to the bindex Act.",
"examples": [
{
"snippet": "mvn org.machanism.machai:bindex-maven-plugin:1.4.1:bindex-per-module",
"description": "Runs module-scoped generation from a project or multi-module reactor. Maven invokes org.machanism.machai.bindex.maven.BindexPerModuleMojo for each applicable module."
}
]
},
{
"package": "org.machanism.machai.bindex.maven",
"name": "register",
"signature": "public void org.machanism.machai.bindex.maven.RegisterMojo.execute() throws org.apache.maven.plugin.MojoExecutionException",
"description": "Registers generated Bindex metadata once for a reactor by delegating to the bindex/register Machai workflow. The goal is a thread-safe aggregator and can run without a Maven project.",
"examples": [
{
"snippet": "mvn org.machanism.machai:bindex-maven-plugin:1.4.1:register",
"description": "Registers the generated reactor metadata using the registry and credential configuration inherited by org.machanism.machai.bindex.maven.RegisterMojo."
}
]
},
{
"package": "org.machanism.machai.bindex.maven",
"name": "register-per-module",
"signature": "public void org.machanism.machai.bindex.maven.RegisterPerModuleMojo.execute() throws org.apache.maven.plugin.MojoExecutionException",
"description": "Registers the Bindex metadata associated with each Maven module by delegating to the bindex/register workflow with the current project and reactor context.",
"examples": [
{
"snippet": "mvn org.machanism.machai:bindex-maven-plugin:1.4.1:register-per-module",
"description": "Runs registration in each applicable module through org.machanism.machai.bindex.maven.RegisterPerModuleMojo."
}
]
}
],
"customizations": [
{
"name": "Ghostwriter workflow parameters",
"package": "org.machanism.machai.bindex.maven",
"description": "Configure gw.config, gw.model, gw.instructions, gw.excludes, and genai.serverId as Maven properties. Additional action-specific name/value pairs can be supplied in the plugin params map and are forwarded unchanged to the selected Machai Act.",
"type": "Maven plugin configuration",
"examples": [
{
"snippet": "\n gpt-4o-mini\n machai-genai\n \n bindex.json\n \n",
"description": "Configures model selection, Maven server credentials, and an action-specific output parameter in the plugin declaration."
}
]
}
],
"studs": [],
"examples": [
{
"title": "Install, configure, and generate reactor-wide Bindex metadata",
"installation": "Add org.machanism.machaibindex-maven-plugin1.4.1 inside the build plugins section of pom.xml, or invoke the fully qualified goal directly without editing the POM.",
"configuration": "If the selected AI provider requires credentials, add machai-genaiyour-api-useryour-api-key to the servers section of the user Maven settings.xml. Keep secrets outside pom.xml. Select the model with gw.model and the server with genai.serverId; optional properties include gw.config, gw.instructions, and gw.excludes.",
"run": "From the reactor root, run mvn org.machanism.machai:bindex-maven-plugin:1.4.1:bindex -Dgw.model=gpt-4o-mini -Dgenai.serverId=machai-genai.",
"result": "The plugin invokes the bindex Machai Act once with reactor context and generates structured Bindex metadata for review and downstream semantic discovery."
},
{
"title": "Bind generation to every module in a multi-module build",
"installation": "Declare org.machanism.machai:bindex-maven-plugin:1.4.1 in the parent POM build plugins section.",
"configuration": "Add an execution containing bindex-per-module. Configure model, instructions, exclusions, credentials, and params either in the plugin configuration or with Maven properties.",
"run": "Run mvn verify from the reactor root when the execution is bound to a lifecycle phase, or invoke mvn org.machanism.machai:bindex-maven-plugin:1.4.1:bindex-per-module directly.",
"result": "Maven executes org.machanism.machai.bindex.maven.BindexPerModuleMojo in each applicable module so every module can produce metadata in its own project context."
},
{
"title": "Register generated metadata",
"installation": "Use the same org.machanism.machai:bindex-maven-plugin:1.4.1 plugin installation used for generation.",
"configuration": "Provide registry connection details and credentials through the selected Ghostwriter workflow configuration and Maven settings server. Use the reactor goal for one metadata document or the per-module goal when every module owns its metadata.",
"run": "Run mvn org.machanism.machai:bindex-maven-plugin:1.4.1:register for reactor-wide registration, or mvn org.machanism.machai:bindex-maven-plugin:1.4.1:register-per-module for module-scoped registration.",
"result": "The plugin delegates publication to the bindex/register Machai workflow with the appropriate reactor or module context."
}
],
"dependencies": [
"org.machanism.machai:gw-maven-plugin:1.4.1",
"org.machanism.machai:bindex-core:1.4.1",
"org.apache.commons:commons-lang3:3.20.0",
"com.google.guava:guava:33.5.0-jre",
"org.apache.maven.shared:maven-shared-utils:3.4.2",
"org.apache.maven:maven-core:3.8.1",
"org.apache.maven.plugin-tools:maven-plugin-annotations:3.15.2",
"org.codehaus.plexus:plexus-interactivity-api:1.5.1",
"org.slf4j:slf4j-api:2.0.17"
],
"location": {
"repositoryType": "Maven",
"repositoryUrl": "https://repo.maven.apache.org/maven2",
"coordinates": {
"group": "org.machanism.machai",
"artifactId": "bindex-maven-plugin",
"version": "1.4.1",
"extension": "jar"
}
}
}