Skip to content

Commit a8d9726

Browse files
committed
HBASE-25983 javadoc generation fails on openjdk-11.0.11+9 (#4837)
Signed-off-by: Nick Dimiduk <[email protected]> (cherry picked from commit 792f12b)
1 parent 098e598 commit a8d9726

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

pom.xml

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,12 @@
553553
comes in via hbase-thirdparty hbase-shaded-netty-->
554554
<netty.hadoop.version>3.6.2.Final</netty.hadoop.version>
555555
<!-- end HBASE-15925 default hadoop compatibility values -->
556-
<audience-annotations.version>0.5.0</audience-annotations.version>
556+
<audience-annotations.version>0.13.0</audience-annotations.version>
557+
<!--
558+
The version used when generating javadoc, 0.13.0 is the latest version which supports jdk8.
559+
When building with jdk11, we will use 0.14.1, please see the build-with-jdk11 profile.
560+
-->
561+
<javadoc.audience-annotations.version>0.13.0</javadoc.audience-annotations.version>
557562
<avro.version>1.7.7</avro.version>
558563
<caffeine.version>2.8.1</caffeine.version>
559564
<commons-codec.version>1.13</commons-codec.version>
@@ -697,8 +702,7 @@
697702
this parameter by invoking mvn with -Dbuild.id=$BUILD_ID-->
698703
<build.id>${maven.build.timestamp}</build.id>
699704
<shell-executable>bash</shell-executable>
700-
<!-- TODO HBASE-15041 clean up our javadocs so jdk8 linter can be used.
701-
property as of javadoc-plugin 3.0.0 -->
705+
<!-- Still need this to ignore some errors when building javadoc-->
702706
<doclint>none</doclint>
703707
</properties>
704708
<!-- Sorted by groups of dependencies then groupId and artifactId -->
@@ -1452,8 +1456,6 @@
14521456
<groupId>org.apache.maven.plugins</groupId>
14531457
<artifactId>maven-compiler-plugin</artifactId>
14541458
<configuration>
1455-
<source>${compileSource}</source>
1456-
<target>${compileSource}</target>
14571459
<showWarnings>true</showWarnings>
14581460
<showDeprecation>false</showDeprecation>
14591461
<useIncrementalCompilation>false</useIncrementalCompilation>
@@ -2487,7 +2489,7 @@
24872489
<docletArtifact>
24882490
<groupId>org.apache.yetus</groupId>
24892491
<artifactId>audience-annotations</artifactId>
2490-
<version>${audience-annotations.version}</version>
2492+
<version>${javadoc.audience-annotations.version}</version>
24912493
</docletArtifact>
24922494
<useStandardDocletOptions>true</useStandardDocletOptions>
24932495
<destDir>apidocs</destDir>
@@ -2544,7 +2546,7 @@
25442546
<docletArtifact>
25452547
<groupId>org.apache.yetus</groupId>
25462548
<artifactId>audience-annotations</artifactId>
2547-
<version>${audience-annotations.version}</version>
2549+
<version>${javadoc.audience-annotations.version}</version>
25482550
</docletArtifact>
25492551
<useStandardDocletOptions>true</useStandardDocletOptions>
25502552
<destDir>testapidocs</destDir>
@@ -2645,18 +2647,17 @@
26452647
<profile>
26462648
<id>build-with-jdk8</id>
26472649
<activation>
2648-
<jdk>[1.8,)</jdk>
2650+
<jdk>1.8</jdk>
26492651
</activation>
2650-
<build>
2651-
<pluginManagement>
2652-
<plugins/>
2653-
</pluginManagement>
2654-
</build>
2652+
<properties>
2653+
<maven.compiler.source>${compileSource}</maven.compiler.source>
2654+
<maven.compiler.target>${compileSource}</maven.compiler.target>
2655+
</properties>
26552656
</profile>
26562657
<profile>
26572658
<id>build-with-jdk11</id>
26582659
<activation>
2659-
<jdk>[1.11,)</jdk>
2660+
<jdk>[11,)</jdk>
26602661
</activation>
26612662
<properties>
26622663
<maven.compiler.release>${releaseTarget}</maven.compiler.release>
@@ -2669,8 +2670,36 @@
26692670
TODO: replicate logic for windows
26702671
-->
26712672
<surefire.Xmx>2200m</surefire.Xmx>
2673+
<!--
2674+
com.sun.javadoc and com.sun.tools.doclets are both deprecated in java 11 and will
2675+
fail the javadoc generating, so we need to use yetus 0.14.1 where it uses jdk.javadoc
2676+
and jdk.javadoc.doclet instead
2677+
-->
2678+
<javadoc.audience-annotations.version>0.14.1</javadoc.audience-annotations.version>
26722679
</properties>
26732680
<build>
2681+
<pluginManagement>
2682+
<plugins>
2683+
<plugin>
2684+
<groupId>org.apache.maven.plugins</groupId>
2685+
<artifactId>maven-javadoc-plugin</artifactId>
2686+
<version>${maven.javadoc.version}</version>
2687+
<configuration>
2688+
<source>${compileSource}</source>
2689+
<!--
2690+
Need to add this option to ignore the source errors, epsecially that we reference
2691+
test code in hbase-testing-util's main code.
2692+
-->
2693+
<additionalOptions>--ignore-source-errors</additionalOptions>
2694+
<additionalJOptions>
2695+
<additionalJOption>-J-Xmx2G</additionalJOption>
2696+
<additionalJOption>-J--add-exports</additionalJOption>
2697+
<additionalJOption>-Jjdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED</additionalJOption>
2698+
</additionalJOptions>
2699+
</configuration>
2700+
</plugin>
2701+
</plugins>
2702+
</pluginManagement>
26742703
<plugins>
26752704
<plugin>
26762705
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)