Skip to content

build: extract the semantic DOCX/PPTX backend into graph-compose-render-docx#298

Merged
DemchaAV merged 3 commits into
2.0-devfrom
build/2.0-extract-render-docx
Jul 5, 2026
Merged

build: extract the semantic DOCX/PPTX backend into graph-compose-render-docx#298
DemchaAV merged 3 commits into
2.0-devfrom
build/2.0-extract-render-docx

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Why

A 2.0 lean-core goal: a consumer that only renders PDF should not pull Apache POI (~10 MB). This extracts the semantic office backend into its own artifact so POI leaves the core entirely — and, being the smallest extraction, it proves the multi-module publish/reactor/release pipeline before the larger render-pdf and templates moves.

What changed

  • New graph-compose-render-docx module (standalone pom, lockstep-versioned with the engine). DocxSemanticBackenddocument.backend.semantic.docx; the PptxSemanticBackend stub → document.backend.semantic.pptx. The SPI (SemanticBackend, SemanticExportContext, SemanticExportManifest) stays in the core document.backend.semantic package — the backends move to format sub-packages so there is no split package. poi-ooxml is a plain compile dependency of this module.
  • Core drops POI: the root pom's <optional> poi-ooxml dependency, the now-unused poi.version property, and the no-poi profile are removed; the no-poi CI job is retired. The one DocumentSession export test that exercised both backends moves to render-docx as SessionSemanticExportTest (the engine test scope can no longer see the backends; its no-poi guard is dropped because POI is always present in this module).
  • Pipeline wiring (this PR): aggregator gains the module; publish.yml deploys it on the v* tag after the engine (its graph-compose dependency); cut-release.ps1 bumps it in lockstep and adds it to the commit staging allow-list; the examples-generation CI job installs it; examples depends on graph-compose-render-docx (bringing POI transitively) and WordExportExample imports the new FQN.

DocxSemanticBackend / PptxSemanticBackend change public FQN — a documented 2.0 move; the old→new mapping lands in the 2.0 migration guide.

Verification

  • Standalone ./mvnw clean verify -pl . — green. The engine builds POI-free; there is zero org.apache.poi anywhere in the root sources.
  • Reactor ./mvnw -f aggregator/pom.xml verify — green across all modules, including render-docx (its four DOCX tests pass) and examples (which resolves render-docx from the reactor).

DemchaAV added 3 commits July 5, 2026 16:25
…er-docx

Split the POI-backed semantic office backend out of the engine jar so the lean
core no longer carries Apache POI.

- New standalone render-docx/ module (lockstep-versioned with the engine): moves
  DocxSemanticBackend and the PptxSemanticBackend stub into new format packages
  document.backend.semantic.docx / .pptx (the SPI — SemanticBackend,
  SemanticExportContext, SemanticExportManifest — stays in the core
  document.backend.semantic package; a split package is not allowed). poi-ooxml is
  a plain compile dependency here.
- Root pom drops the <optional> poi-ooxml dependency. The DocumentSession export
  test that exercised both backends moves to render-docx as SessionSemanticExportTest
  (the engine test scope can no longer see the backends); its no-poi guard is
  dropped because POI is always present in this module.
- aggregator adds the module; examples depend on graph-compose-render-docx (which
  brings POI transitively) and WordExportExample imports the new FQN.

Reactor build green: render-docx compiles and its docx tests pass, while the root
builds POI-free.
Now that Apache POI lives only in graph-compose-render-docx, drop the engine's
POI-optional plumbing and register the new module in the release/CI pipeline.

- Root pom: remove the now-unused poi.version property and the no-poi profile
  (the surefire POI-exclusion + no.poi system property) — POI is no longer on the
  engine classpath, so there is nothing to exclude.
- ci.yml: drop the no-poi-suite job; add a graph-compose-render-docx install step
  to the examples-generation job (the DOCX example resolves the backend there).
- publish.yml: deploy graph-compose-render-docx to Central on the v* tag, after
  the engine (its graph-compose dependency).
- cut-release.ps1: bump render-docx/pom.xml in lockstep and add it to the commit
  staging allow-list.
- Reword the DocxSemanticBackend "optional POI" javadoc — POI ships with the module now.
…ards

- CHANGELOG: note graph-compose-render-docx carrying the DOCX/PPTX backend + POI,
  the DocxSemanticBackend/PptxSemanticBackend package move, and the retired no-poi
  profile.
- docs/recipes/docx-export.md, docs/troubleshooting.md, examples/README.md: point
  DOCX consumers at graph-compose-render-docx instead of raw poi-ooxml; fix the
  moved-test link and the new import FQN.
- Drop the now-inert @DisabledIfSystemProperty("no.poi") guards (and the
  retired-profile javadoc) from the three moved DOCX tests — the no-poi profile
  no longer exists.
@DemchaAV DemchaAV merged commit 4a26764 into 2.0-dev Jul 5, 2026
10 checks passed
@DemchaAV DemchaAV deleted the build/2.0-extract-render-docx branch July 5, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant