Skip to content

[maven-3.9.x] Port the site documentation from APT to Markdown - #12713

Merged
slachiewicz merged 3 commits into
apache:maven-3.9.xfrom
slachiewicz:apt2md-39x
Aug 8, 2026
Merged

[maven-3.9.x] Port the site documentation from APT to Markdown#12713
slachiewicz merged 3 commits into
apache:maven-3.9.xfrom
slachiewicz:apt2md-39x

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Ports the site documentation from APT to Markdown on maven-3.9.x, following #12682 on master.

All 24 pages converted; none left as APT. Three commits: a rename-only commit so git log --follow survives, then the conversion, then four readability edits kept separate for review. Please merge or rebase rather than squash.

Unlike the 4.0.x port, these 24 are a different and smaller set than master's 38, so this is a fresh conversion rather than a port of reviewed work.

Three traps that produce a clean build and a wrong page

Each was found by comparing rendered output, not by the build failing:

  1. ${…} in flow text became an anchor. APT reads the braces as an anchor definition, so the baseline HTML rendered a visible $maven.home plus a stray <a id="maven.home">. The converter faithfully reproduced that breakage. 8 references repaired to literal code spans, matching master. Note the baseline was already wrong — this fixes it.
  2. Bare file:// gets autolinked into <a href="file://">, which APT never produced. 8 occurrences in offline-mode escaped as file\://.
  3. Empty table cells must be | |, not ||. String.split drops trailing empty fields, so a row ending in empty cells comes back short and ArtifactHandlerTest reads past its array end.

A fourth of the same kind: APT read the angle brackets of <developerConnection/> as italic markup and swallowed them, so the baseline rendered developerConnection/ italicised with no brackets. A code span restores them. That one arrived as a "readability" edit and turned out to be a fidelity fix.

Front matter kept

Master's conversion commit dropped it and a follow-up (096d59ec94) restored it; master carries it today. Keeping it from the outset preserves <meta name="author">, <meta name="date"> and the real page titles.

Verification

Full reactor mvn site before and after. Not the build succeeding — all 202 generated pages compared through a normaliser covering visible text, heading levels, table cells, list items, <pre> markers, link targets and page metadata.

202 compared, 0 missing, 2 differingconfiguration-management and getting-to-container-configured-mojos, and the only differences are the intended repairs above. ArtifactHandlerTest passes; it was checked to be the only test in the branch that reads a site document.

Limits: the normaliser is text, structure markers and link targets, so a purely visual change — CSS, spacing, <b> versus <strong> — would not show, and no page was opened in a browser. Only ArtifactHandlerTest was run, not the full suite.

Two typos deliberately left alone

configuration-management reads "tweaking the the various files" and "analagous to the repository". Both are already fixed on 4.0.x and master. They are prose changes rather than conversion artefacts, so folding them in would have muddied the verification — happy to fix separately if wanted.

Git records a rename plus a rewrite in one commit as a delete and an add, so
the conversion that follows would break `git log --follow`. Merge or rebase
this branch, do not squash it.
24 page(s) converted with doxia-converter and then cleaned up by hand:

- <<<code>>> becomes backticks, <<bold>> becomes **bold**, {{{url}text}}
  becomes [text](url)
- the ASF license header becomes a single block HTML comment, kept below the
  YAML front matter the converter writes. The front matter has to be the first
  bytes of the file for the parser to see it, and it is what carries the page
  title, author and date into <title> and <meta>
- a page that keeps a Velocity reference stays a .vm. Velocity reads ## as a
  line comment and would silently swallow every ATX heading below level one,
  so subsections use setext underlines
- a verbatim block gets the language it actually contains, or none where it is
  an ASCII diagram

Two references that APT itself rendered wrongly are repaired rather than
carried over: APT reads the braces of ${maven.home} as an anchor definition and
emitted "$" followed by a stray <a id="maven.home">, so the page showed
"$maven.home" and defined an anchor nobody links to. These now read
`${maven.home}` as the author meant. This affects seven references in
configuration-management (maven.home, user.name, user.home, project.home,
maven.user.config.dir) and one in getting-to-container-configured-mojos
(project.build.resources).

Bare "file://" in offline-mode is written "file\://" because the Markdown
parser turns an unescaped one into a link to file:// that APT never produced.

ArtifactHandlerTest reads the artifact handlers table straight out of the site
documentation to check it against the container, so it follows the page to
Markdown. An empty cell is written "| |" rather than "||": Java's String.split
drops trailing empty fields, so a row ending in empty cells would come back
short and the test would read past the end of it.

Twenty of these 24 pages are byte-identical to their maven-3.10.x counterparts
and carry the same conversion; artifact-handlers, default-bindings, lifecycles
and maven-model-builder's index differ between the branches and were converted
against this branch's own sources.

Verified by building the site before and after and comparing all 202 generated
pages, including their <title>, author and date metadata: the visible text and
the link targets are identical apart from the eight repaired references above.
APT rendered these as running prose because it had no markup for them, and the
conversion reproduced that faithfully. Markdown can say what the author meant,
so this page now matches the one on master:

- "Properties" becomes a heading and the three property lines a code block,
  which is what their alignment was already trying to convey
- the list written with "o" bullets becomes a real list
- <developerConnection/> becomes a code span. APT read the angle brackets as
  its italic markup and swallowed them, so the page showed "developerConnection/"
  in italics; the element name is now spelled the way it appears in a POM

Re-verified against the pre-conversion site: still 202 pages, none missing, and
the only pages that differ from the baseline are this one and
getting-to-container-configured-mojos, both by their intended changes.
@slachiewicz slachiewicz added documentation Improvements or additions to documentation maintenance labels Aug 8, 2026

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, thoroughly verified APT-to-Markdown conversion of all 24 site documentation pages on maven-3.9.x.

Key observations:

  • Every deleted APT file has a matching Markdown replacement. No documentation pages lost.
  • The only non-documentation change (ArtifactHandlerTest.java) is correct: path updated, method renamed, table parsing adapted for Markdown syntax.
  • The four rendering traps documented in the PR description are all properly handled: ${...} converted to code spans, bare file:// escaped, empty table cells written as | |, and <developerConnection/> wrapped in code spans.
  • Doxia macros correctly converted: APT %{snippet|...} becomes <!-- MACRO{snippet|...} -->.
  • Minor cosmetic note: ~8 links have a leading space in link text (e.g. [ Settings Reference]), faithfully carried from APT syntax. Non-blocking.
  • The three-commit structure (rename, convert, readability edits) supports git log --follow — respect the PR body's request to merge/rebase rather than squash.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

@slachiewicz
slachiewicz merged commit f15a7a2 into apache:maven-3.9.x Aug 8, 2026
18 checks passed
@slachiewicz
slachiewicz deleted the apt2md-39x branch August 8, 2026 16:48
@github-actions github-actions Bot added this to the 3.9.17 milestone Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants