Skip to content

docs: fix rendering of element names in repositoryOrigins/settings descriptions - #13680

Closed
suryakant-source wants to merge 1 commit into
apache:masterfrom
suryakant-source:fix-settings-mdo-code-markup
Closed

suryakant-source wants to merge 1 commit into
apache:masterfrom
suryakant-source:fix-settings-mdo-code-markup

Conversation

@suryakant-source

Copy link
Copy Markdown

Fixes #13675.

Problem

On https://maven.apache.org/ref/3.10.0/maven-settings/settings.html, several descriptions render with an empty inline code element, e.g. "not listed in <code></code> but activated through <code></code> or <code>-P</code>", so the element names (<server>, <activeProfile>, ...) are swallowed.

Root cause

In api/maven-api-settings/src/main/mdo/settings.mdo, the affected descriptions write the element names as {@code &lt;X&gt;}. After the .mdo XML decoding, modello-plugin-xdoc's rewrite() (javadoc-parser + jsoup) receives {@code <X>} and generates <code><X></X></code>: the unknown element inside <code> is dropped downstream, leaving an empty code element. The raw-markup form <code>&lt;X&gt;</code>, already used elsewhere in the same file, survives the pipeline and renders correctly.

I reproduced this locally with the exact rewrite() code path of modello-plugin-xdoc using modello's pinned versions (javadoc-parser 0.3.1, jsoup 1.23.2): the {@code &lt;X&gt;} form produces the nested/broken markup while <code>&lt;X&gt;</code> produces the correct output.

Solution

Switch the affected descriptions in settings.mdo (proxy, server, activeProfiles, activation, property.name) from {@code &lt;X&gt;} to <code>&lt;X&gt;</code>. This form renders correctly in both the generated site page and the generated javadoc.

Testing

  • Local repro harness against modello-plugin-xdoc's rewrite() code path (javadoc-parser 0.3.1 + jsoup 1.23.2): verified broken output before and correct output after for each of the 5 changed spots.
  • Verified the modified settings.mdo is still well-formed XML.
  • I could not run the full Maven site build in my environment (no Maven available), so the regenerated site page itself was not rebuilt.

Risk

Low: docs-source-only change. Note: the same {@code &lt;...&gt;} pattern exists in other .mdo files (e.g. maven.mdo); I left those untouched here and can follow up if the maintainers want them fixed the same way.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. The root cause is well-identified (modello-plugin-xdoc's rewrite() strips HTML elements nested inside <code> generated from {@code <X>}), and the fix is minimal and correctly targeted — switching only the five occurrences where the {@code} content contains HTML-encoded angle brackets. Leaving {@code -P} and {@code scheme://host} unchanged is correct since those render fine.

Note for maintainers: api/maven-api-model/src/main/mdo/maven.mdo has 228 occurrences of {@code and the same {@code &lt;element&gt;} pattern is present there too (not in scope here but worth a follow-up).

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@gnodet

gnodet commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Closing in favour of #13678 which fixes the same issue (#13675) more broadly across all .mdo files.

@gnodet gnodet closed this Oct 22, 2026
@suryakant-source

Copy link
Copy Markdown
Author

Makes sense, thanks @gnodet - #13678 covering all .mdo files is the better fix. Closing this one.

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.

Docs - repositoryOrigin description not rendered correctly

3 participants