Switch javadoc link-modularity-mismatch flag to info

We now invoke the javadoc tool with "--link-modularity-mismatch info"
in order not to fail the build when encountering warnings such as the
following.

> The code being documented uses packages in the unnamed module, but the
> packages defined in https://junit.org/junit5/docs/5.12.2/api/ are in
> named modules.

Closes gh-27497
This commit is contained in:
Sam Brannen
2025-04-16 14:16:59 +02:00
parent 3057de7746
commit 39e263fe5d
2 changed files with 8 additions and 1 deletions

View File

@@ -82,6 +82,9 @@ javadoc {
// 'framework-api:javadoc' task checks for 'reference' in addition
// to 'syntax'.
addBooleanOption("Xdoclint:syntax,-reference", true)
// Change modularity mismatch from warn to info.
// See https://github.com/spring-projects/spring-framework/issues/27497
addStringOption("-link-modularity-mismatch", "info")
// With the javadoc tool on Java 24, it appears that the 'reference'
// group is always active and the '-reference' flag is not honored.
// Thus, we do NOT fail the build on Javadoc warnings due to