Skip to content

Maven Plugin & Lint

BLOGE ships two complementary build-time tools:

  • bloge-maven-plugin for operator metadata export
  • bloge-lint for static analysis of .bloge files

Together they make DSL assets and operator catalogs easier to validate and visualize in CI.

Maven plugin: export operator metadata

The Maven plugin scans compiled operator classes, infers or reads their schema, and generates operator-metadata.json for Studio and other tooling.

Add the plugin

xml
<plugin>
  <groupId>com.leanowtech.bloge</groupId>
  <artifactId>bloge-maven-plugin</artifactId>
  <version>${bloge.version}</version>
  <executions>
    <execution>
      <goals>
        <goal>export-metadata</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Run it manually

bash
mvn bloge:export-metadata

What it exports

The generated JSON includes:

  • operator name and class name
  • input and output Java types
  • inferred or explicit input schema
  • inferred or explicit output schema
  • generation metadata

This file becomes the operator catalog for Studio and other schema-aware tools.

Lint CLI and Maven integration

bloge-lint performs static analysis on .bloge files.

CLI usage

bash
java -jar bloge-lint.jar check path/to/file.bloge
java -jar bloge-lint.jar check src/main/resources/bloge/

Common rules

RuleDescription
no-duplicate-node-idNode ID declared more than once
no-duplicate-schema-nameSchema name declared more than once
no-unresolved-dependencydepends_on references a missing node
no-unresolved-branch-targetBranch target references a missing node
no-cycleGraph contains a cycle
missing-timeoutNode has no timeout configured
missing-doc-commentNode is missing documentation
excessive-fan-outNode has too many outgoing edges

.blogerc.json

json
{
  "rules": {
    "missing-timeout": "warning",
    "missing-doc-comment": "off"
  }
}

A common workflow looks like this:

  1. compile operator classes
  2. run bloge:export-metadata
  3. run lint on committed .bloge assets
  4. publish metadata for Studio or repository artifacts

This keeps code-defined operators and externally authored DSL files aligned.

Integration with Studio

operator-metadata.json is Studio's input for:

  • operator palette population
  • input/output schema visualization
  • field completion hints
  • richer graph authoring UX

Practical guidance

  • Generate metadata as part of your build, not as an afterthought.
  • Treat lint failures as part of normal CI quality gates.
  • Tune warning-level rules gradually as graph authoring discipline matures.
  • Use metadata export to make operator contracts discoverable to non-runtime tooling.

Next steps