ADR-0006: Cross-Component Partials for Documentation Reuse
Context
The maven-mcps umbrella project contains sub-projects (like mail-mcp) with their own documentation. Central usage documentation in maven-mcps needs to reference setup instructions, prerequisites, and tool descriptions from sub-projects.
Problem
Documentation was duplicated between:
-
Central docs (
docs/modules/usage/pages/mail-mcp-setup.adoc) -
Sub-project docs (
mail-mcp/docs/modules/usage/pages/mcp-server.adoc,docker.adoc)
This duplication led to:
-
Content drift when one location was updated but not the other
-
Maintenance burden keeping both in sync
-
Inconsistent information for users
Decision
Use Antora partials in sub-projects that can be included by both the sub-project’s own docs and the central maven-mcps docs.
Implementation
Partials are placed in the sub-project’s docs/modules/ROOT/partials/ directory:
mail-mcp/docs/modules/ROOT/partials/
├── prerequisites.adoc # Docker/Podman requirements
├── quick-start.adoc # Service startup and data retrieval
├── available-tools.adoc # MCP tool descriptions
└── mcp-config.adoc # Claude Code/Desktop configuration
Consequences
Positive
- Single source of truth
-
Content is authored once in the sub-project and reused everywhere.
- Automatic synchronization
-
Central docs always reflect the latest sub-project documentation.
- Self-contained sub-projects
-
mail-mcp docs work independently; partials are used internally too.
- Granular reuse
-
Different pages can include different combinations of partials.
Negative
- Antora dependency
-
Cross-component includes only work when building with Antora.
- Partial design required
-
Content must be structured to work in multiple contexts (no context-specific assumptions).
- Build-time coupling
-
Central docs depend on sub-project partials being available at build time.
Neutral
- Partial granularity
-
Decided on 4 focused partials rather than one large partial or many small ones. This balances reuse flexibility with maintenance overhead.
- Detailed vs summary content
-
Central docs use brief partials (e.g.,
available-tools.adocwith description list). Sub-project docs can have detailed sections alongside partial includes.