Class AdocStudioMojo

java.lang.Object
network.ike.docs.plugin.AdocStudioMojo
All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo

@Mojo(name="adocstudio", projectRequired=false) public class AdocStudioMojo extends Object implements org.apache.maven.api.plugin.Mojo
Generate Adoc Studio sidecar projects for assembly modules.

Extracts a bundled Swift script and runs it against the current project directory. For each assembly module (directory with a pom.xml and src/docs/asciidoc/), the script creates an .adocproject file in the sidecar directory. Each project's anchor folder contains a macOS NSURL bookmark pointing back into the Maven source tree, so edits in Adoc Studio land on the canonical sources.

The sidecar directory defaults to ~/Documents/ike-adoc-studio/ and stays outside the Syncthing/git tree. Each machine generates its own bookmarks.

Prerequisite: run mvn validate first to unpack topic dependencies into target/generated-sources/asciidoc/ so Adoc Studio can resolve includes.

Usage:

  mvnw ike:adocstudio                          # default sidecar
  mvnw ike:adocstudio -Dadocstudio.outputDir=~/my-adoc-projects

macOS only — the Swift runtime is required for NSURL bookmark generation. On non-macOS platforms, the goal logs a warning and exits cleanly.

  • Constructor Details

    • AdocStudioMojo

      public AdocStudioMojo()
      Creates this goal instance.
  • Method Details

    • getLog

      protected org.apache.maven.api.plugin.Log getLog()
      Access the Maven logger.
      Returns:
      the logger
    • execute

      public void execute() throws org.apache.maven.api.plugin.MojoException
      Specified by:
      execute in interface org.apache.maven.api.plugin.Mojo
      Throws:
      org.apache.maven.api.plugin.MojoException