Skip to content

Commit 792f12b

Browse files
authored
HBASE-25983 javadoc generation fails on openjdk-11.0.11+9 (#4837)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
1 parent 2a3d5b1 commit 792f12b

1 file changed

Lines changed: 45 additions & 14 deletions

File tree

pom.xml

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,12 @@
782782
comes in via hbase-thirdparty hbase-shaded-netty-->
783783
<netty.hadoop.version>3.10.5.Final</netty.hadoop.version>
784784
<!-- end HBASE-15925 default hadoop compatibility values -->
785-
<audience-annotations.version>0.5.0</audience-annotations.version>
785+
<audience-annotations.version>0.13.0</audience-annotations.version>
786+
<!--
787+
The version used when generating javadoc, 0.13.0 is the latest version which supports jdk8.
788+
When building with jdk11, we will use 0.14.1, please see the build-with-jdk11 profile.
789+
-->
790+
<javadoc.audience-annotations.version>0.13.0</javadoc.audience-annotations.version>
786791
<avro.version>1.11.0</avro.version>
787792
<caffeine.version>2.8.1</caffeine.version>
788793
<commons-codec.version>1.13</commons-codec.version>
@@ -933,8 +938,7 @@
933938
this parameter by invoking mvn with -Dbuild.id=$BUILD_ID-->
934939
<build.id>${maven.build.timestamp}</build.id>
935940
<shell-executable>bash</shell-executable>
936-
<!-- TODO HBASE-15041 clean up our javadocs so jdk8 linter can be used.
937-
property as of javadoc-plugin 3.0.0 -->
941+
<!-- Still need this to ignore some errors when building javadoc-->
938942
<doclint>none</doclint>
939943
</properties>
940944
<!-- Sorted by groups of dependencies then groupId and artifactId -->
@@ -1767,8 +1771,6 @@
17671771
<groupId>org.apache.maven.plugins</groupId>
17681772
<artifactId>maven-compiler-plugin</artifactId>
17691773
<configuration>
1770-
<source>${compileSource}</source>
1771-
<target>${compileSource}</target>
17721774
<showWarnings>true</showWarnings>
17731775
<showDeprecation>false</showDeprecation>
17741776
<useIncrementalCompilation>false</useIncrementalCompilation>
@@ -3010,7 +3012,7 @@
30103012
<docletArtifact>
30113013
<groupId>org.apache.yetus</groupId>
30123014
<artifactId>audience-annotations</artifactId>
3013-
<version>${audience-annotations.version}</version>
3015+
<version>${javadoc.audience-annotations.version}</version>
30143016
</docletArtifact>
30153017
<useStandardDocletOptions>true</useStandardDocletOptions>
30163018
<destDir>apidocs</destDir>
@@ -3067,7 +3069,7 @@
30673069
<docletArtifact>
30683070
<groupId>org.apache.yetus</groupId>
30693071
<artifactId>audience-annotations</artifactId>
3070-
<version>${audience-annotations.version}</version>
3072+
<version>${javadoc.audience-annotations.version}</version>
30713073
</docletArtifact>
30723074
<useStandardDocletOptions>true</useStandardDocletOptions>
30733075
<destDir>testapidocs</destDir>
@@ -3157,18 +3159,17 @@
31573159
<profile>
31583160
<id>build-with-jdk8</id>
31593161
<activation>
3160-
<jdk>[1.8,)</jdk>
3162+
<jdk>1.8</jdk>
31613163
</activation>
3162-
<build>
3163-
<pluginManagement>
3164-
<plugins/>
3165-
</pluginManagement>
3166-
</build>
3164+
<properties>
3165+
<maven.compiler.source>${compileSource}</maven.compiler.source>
3166+
<maven.compiler.target>${compileSource}</maven.compiler.target>
3167+
</properties>
31673168
</profile>
31683169
<profile>
31693170
<id>build-with-jdk11</id>
31703171
<activation>
3171-
<jdk>[1.11,)</jdk>
3172+
<jdk>[11,)</jdk>
31723173
</activation>
31733174
<properties>
31743175
<maven.compiler.release>${releaseTarget}</maven.compiler.release>
@@ -3188,7 +3189,37 @@
31883189
TODO: replicate logic for windows
31893190
-->
31903191
<surefire.Xmx>2200m</surefire.Xmx>
3192+
<!--
3193+
com.sun.javadoc and com.sun.tools.doclets are both deprecated in java 11 and will
3194+
fail the javadoc generating, so we need to use yetus 0.14.1 where it uses jdk.javadoc
3195+
and jdk.javadoc.doclet instead
3196+
-->
3197+
<javadoc.audience-annotations.version>0.14.1</javadoc.audience-annotations.version>
31913198
</properties>
3199+
<build>
3200+
<pluginManagement>
3201+
<plugins>
3202+
<plugin>
3203+
<groupId>org.apache.maven.plugins</groupId>
3204+
<artifactId>maven-javadoc-plugin</artifactId>
3205+
<version>${maven.javadoc.version}</version>
3206+
<configuration>
3207+
<source>${compileSource}</source>
3208+
<!--
3209+
Need to add this option to ignore the source errors, epsecially that we reference
3210+
test code in hbase-testing-util's main code.
3211+
-->
3212+
<additionalOptions>--ignore-source-errors</additionalOptions>
3213+
<additionalJOptions>
3214+
<additionalJOption>-J-Xmx2G</additionalJOption>
3215+
<additionalJOption>-J--add-exports</additionalJOption>
3216+
<additionalJOption>-Jjdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED</additionalJOption>
3217+
</additionalJOptions>
3218+
</configuration>
3219+
</plugin>
3220+
</plugins>
3221+
</pluginManagement>
3222+
</build>
31923223
</profile>
31933224
<!-- profile activated by the Jenkins patch testing job -->
31943225
<profile>

0 commit comments

Comments
 (0)