Skip to content

Enable javadoc doclint and fix all HTML/reference errors across the JDK matrix - #201

Merged
vharseko merged 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:fix-javadoc-jdk17
Jul 8, 2026
Merged

vharseko merged 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:fix-javadoc-jdk17

Conversation

@vharseko

@vharseko vharseko commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Enables javadoc doclint (removes <doclint>none</doclint> from the maven-javadoc-plugin config) and fixes every resulting HTML/reference error so mvn package produces javadoc with 0 doclint errors on JDK 11, 17, 21, 25 and 26.

Changes

  • pom.xml: drop <doclint>none</doclint>; register the legacy plugin-descriptor tags (@goal/@phase/@parameter/@component/@required/@readonly/@threadSafe) in <tags> — they are consumed by maven-plugin-plugin, so they are declared rather than removed.
  • HTML5 doclint fixes (comments only): <tt>→<code>, add <caption> to tables, drop unsupported attributes (align/valign/summary/cellspacing/cellpadding), move <pre>/<p>/lists out of <code>/<a>, fix heading levels and anchor patterns, close unbalanced tags, escape bare <, >, &.
  • References: fix broken @link/@throws/@see, drop generic type args in {@link X<Y>}.
  • JDK 11 (HTML4 doclint) specifics: <br>/<hr> without the self-closing slash, anchor ids starting with a letter, escape bare > (>=, ->, > 0) in prose.
  • Remove noise tags (@ThreadSafe/@category/@Checkstyle) that emit nothing.
  • Add the Portions Copyrighted 2026 3A Systems, LLC header line to the modified files.

Only Javadoc comments, file headers and the plugin configuration change — no production code changes.

Verification

Ran mvn --batch-mode -Dmaven.test.skip=true package (the CI build command) on JDK 11, 17, 21 and 26 locally — each reports 0 javadoc doclint errors and no javadoc-jar failures. JDK 25 sits between 21 and 26 (same HTML5 doclint) and is covered by them.

…DK matrix

Remove <doclint>none</doclint> from the maven-javadoc-plugin config and make
javadoc pass under JDK 11/17/21/25/26:
- register legacy plugin-descriptor tags (@goal/@parameter/@component/...)
  in <tags> so doclint accepts them (they are read by maven-plugin-plugin)
- fix HTML5 doclint issues: <tt>-> <code>, add table captions, drop
  unsupported attributes (align/valign/summary/cellspacing/cellpadding),
  unnest <pre>/<p>/lists from <code>/<a>, fix heading levels, close tags,
  escape bare < > &
- fix broken @link/@throws/@see references and generic {@link X<Y>} type args
- JDK 11 (HTML4 doclint) specifics: <br>/<hr> without the self-closing slash,
  anchor ids that start with a letter, escape bare '>' in prose
- drop noise tags (@ThreadSafe/@category/@checkstyle) that generate no output
- add the "Portions Copyrighted 2026 3A Systems, LLC" header line to the
  modified files

Only Javadoc comments and file headers plus the plugin configuration are
changed; there are no production code changes.
@vharseko
vharseko requested a review from maximthomas July 7, 2026 14:08
On Windows GitHub runners core.autocrlf=true checks out files with CRLF.
JDK 25/26 doclint treats the CR inside the multi-line <a> start tag in
json-schema overview.html as part of the tag name ("unknown tag: a"),
failing the javadoc-jar build. JDK 11/17/21 and Ubuntu/macOS (LF) pass.

- Collapse the multi-line <a> anchor onto one line in core and cli
  overview.html so no line break sits inside the start tag.
- Add .gitattributes (*.html text eol=lf) so HTML is always checked out
  with LF, preventing this class of CRLF-vs-doclint issue.
@vharseko vharseko added documentation Documentation and Javadoc changes ci Build, CI/CD, JDK matrix and workflow changes labels Jul 7, 2026
@vharseko
vharseko merged commit 59a58d3 into OpenIdentityPlatform:master Jul 8, 2026
11 checks passed
@vharseko
vharseko deleted the fix-javadoc-jdk17 branch July 8, 2026 10:01
vharseko pushed a commit that referenced this pull request Nov 28, 2026
## Summary

- Validate generated AsciiDoc page titles at the end of the `antora`
goal and report all pages missing a document title.
- Parse headers with `env-site` set, resolve `ROOT:partial$` includes,
and preserve `:title:` overrides when a document header is present.
- Cover pages with only a section heading or title attribute, plus a
header conditional on `:title:`.

## Testing

- `mvn -o -pl commons/doc-maven-plugin -am -Dmaven.javadoc.skip=true
install` passed on JDK 17 with 553 tests.
- Ran Antora generation with the updated plugin against the OpenIG,
OpenAM, OpenIDM, and OpenDJ PR sources. The OpenDJ run used locally
generated man-page partials. [OpenIG
#201](OpenIdentityPlatform/OpenIG#201), [OpenAM
#1259](OpenIdentityPlatform/OpenAM#1259),
[OpenIDM
#281](OpenIdentityPlatform/OpenIDM#281), [OpenDJ
#1342](OpenIdentityPlatform/OpenDJ#1342).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Build, CI/CD, JDK matrix and workflow changes documentation Documentation and Javadoc changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants