GW Maven Plugin 1.4.1 API

GW Maven Plugin API

GW Maven Plugin is an advanced documentation automation tool for Java projects. It scans, analyzes, and assembles project documentation using embedded guidance tags and AI-powered synthesis, helping maintain consistent, current documentation across project modules.

GW Maven Plugin supports all types of project files, including source code, documentation, project site content, and other relevant files. Its Maven goals derive Ghostwriter configuration from Maven properties, mojo parameters, project settings, and, when configured, credentials and custom settings from a Maven settings.xml server entry. The goals then run guidance-driven processing or an explicitly selected act over the requested project tree.

Architecture and usage

The Maven integration package provides shared goal infrastructure for Maven context, configuration, scan paths, instructions, exclusions, provider settings, and reporting. GWMojo and GWPerModuleMojo locate files containing Ghostwriter guidance comments and execute their workflows. ActMojo and ActPerModuleMojo resolve a named act or inline prompt and delegate execution to the Ghostwriter act processor.

Aggregator goals can traverse a project tree, including a multi-module tree, with child modules processed before their parents. Per-module goals are non-aggregating and rely on Maven reactor scheduling for selected modules. Common base classes centralize Maven parameter binding and processor setup, so both execution models use the same provider configuration, exclusions, instructions, and project-aware tools.

When a Maven project is available, the integration registers class introspection tools. These tools associate each project with a lazily created class loader built from its resolved compile classpath and output directories. They provide bounded discovery by simple-name pattern and reflection metadata for visible classes, including declared members, annotations, origins, dependency coordinates, and available source files.

Class diagram

Class diagram showing the AbstractGWMojo hierarchy, aggregator and per-module guidance and act mojos, and their relationship to the class-discovery function tools used by Ghostwriter workflows.

Packages

org.machanism.machai.gw.maven
Maven-plugin goals and common infrastructure for configuring and running Ghostwriter guidance and act workflows project-wide or for Maven-scheduled reactor modules. The package includes shared configuration, project-layout integration, and aggregator and per-module execution models.
org.machanism.machai.gw.maven.tools
Function tools for controlled Java class discovery and detailed reflection metadata from registered Maven projects and their compile classpaths. The package also reports class origins, dependency coordinates, and source-file locations when available.
Packages
Package
Description
Provides the Maven-plugin integration layer for Machai Ghostwriter workflows.
Supplies Maven-integrated function tools for discovering Java classes and inspecting their reflective metadata.