Skip to content

Commit

Permalink
Fix Javadoc search on JDK 11:
Browse files Browse the repository at this point in the history
Fixed Javadoc search feature on JDK 11, currently used in our
scripts updating snapshot Javadocs on guava.dev and building
Guava releases, by adding no-module-directories.

Note that this option is not present in javadoc tool from JDK 8
and 13+, making javadoc generation there *not supported*.
Whilst we could solve that with profiles, the extra complexity
is deemed unnecessary given we plan to eventually migrate to 17+,
removing this option (and supported for any JDKs before 17).

Fixes google#5457

TESTED=Locally with `mvn javadoc:javadoc` for `guava` module and its android flavour
  • Loading branch information
dt-google committed Dec 1, 2021
1 parent e64ad26 commit 29639a1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@
</additionalOptions>
<linksource>true</linksource>
<source>8</source>
<!--
no-module-directories is required on JDK 11 so that
Javadoc search works correctly.
This option is not present on 8 and 13+ (https://bugs.openjdk.java.net/browse/JDK-8215582),
hence, building Javadocs is only supported on JDK 11.
Remove it once our release and test scripts are migrated to a recent JDK (17+).
-->
<additionalJOption>--no-module-directories</additionalJOption>
</configuration>
<executions>
<execution>
Expand Down
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@
</additionalOptions>
<linksource>true</linksource>
<source>8</source>
<!--
no-module-directories is required on JDK 11 so that
Javadoc search works correctly.
This option is not present on 8 and 13+ (https://bugs.openjdk.java.net/browse/JDK-8215582),
hence, building Javadocs is only supported on JDK 11.
Remove it once our release and test scripts are migrated to a recent JDK (17+).
-->
<additionalJOption>--no-module-directories</additionalJOption>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit 29639a1

Please sign in to comment.