Skip to content

Commit 39e263f

Browse files
committed
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
1 parent 3057de7 commit 39e263f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: framework-api/framework-api.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ javadoc {
3333
links(rootProject.ext.javadocLinks)
3434
// Check for 'syntax' and 'reference' during linting.
3535
addBooleanOption('Xdoclint:syntax,reference', true)
36-
addBooleanOption('Werror', true) // fail build on Javadoc warnings
36+
// Change modularity mismatch from warn to info.
37+
// See https://github.com/spring-projects/spring-framework/issues/27497
38+
addStringOption("-link-modularity-mismatch", "info")
39+
// Fail build on Javadoc warnings.
40+
addBooleanOption('Werror', true)
3741
}
3842
maxMemory = "1024m"
3943
doFirst {

Diff for: gradle/spring-module.gradle

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

0 commit comments

Comments
 (0)