Skip to content

Commit

Permalink
Fix Javadoc generation
Browse files Browse the repository at this point in the history
javadoc is able to create external links to libraries documented with
"mismatching" modularity, like for JUnit Jupiter, which offers modular
documentation.
However, a warning is generated when the mismatch happens, and this is
a problem when using the `-Werror` option to treat warnings as errors.

To circumvent this problem without dropping the `-Werror` option,
Java 18 added the `--link-modularity-mismatch=(warn|info)` command
line option to specify how external documentation with wrong
modularity should be reported.

See:
* https://docs.oracle.com/en/java/javase/18/docs/specs/man/javadoc.html#standard-options-for-the-standard-doclet
* https://bugs.openjdk.org/browse/JDK-8274639
* spring-projects/spring-framework#27497
  • Loading branch information
scordio committed Jul 29, 2024
1 parent f16e5df commit e269a8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<!-- https://bugs.openjdk.org/browse/JDK-8274639 -->
<additionalOptions>--link-modularity-mismatch=info</additionalOptions>
<failOnWarnings>true</failOnWarnings>
<links>
<link>https://javadoc.io/static/com.google.jimfs/jimfs/${jimfs.version}/</link>
Expand Down

0 comments on commit e269a8f

Please sign in to comment.