You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/10/25 15:08:45 UTC
[hbase] branch branch-2.4 updated: HBASE-25983 javadoc generation fails on openjdk-11.0.11+9 (#4837)
This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new a8d97260918 HBASE-25983 javadoc generation fails on openjdk-11.0.11+9 (#4837)
a8d97260918 is described below
commit a8d972609187faa03d6a2ef890c049a333f6495f
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Tue Oct 25 21:41:53 2022 +0800
HBASE-25983 javadoc generation fails on openjdk-11.0.11+9 (#4837)
Signed-off-by: Nick Dimiduk <nd...@apache.org>
(cherry picked from commit 792f12b616ea67822064b64febaf43479a890195)
---
pom.xml | 57 +++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 43 insertions(+), 14 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8cd660cc01d..dee9f884eb7 100755
--- a/pom.xml
+++ b/pom.xml
@@ -553,7 +553,12 @@
comes in via hbase-thirdparty hbase-shaded-netty-->
<netty.hadoop.version>3.6.2.Final</netty.hadoop.version>
<!-- end HBASE-15925 default hadoop compatibility values -->
- <audience-annotations.version>0.5.0</audience-annotations.version>
+ <audience-annotations.version>0.13.0</audience-annotations.version>
+ <!--
+ The version used when generating javadoc, 0.13.0 is the latest version which supports jdk8.
+ When building with jdk11, we will use 0.14.1, please see the build-with-jdk11 profile.
+ -->
+ <javadoc.audience-annotations.version>0.13.0</javadoc.audience-annotations.version>
<avro.version>1.7.7</avro.version>
<caffeine.version>2.8.1</caffeine.version>
<commons-codec.version>1.13</commons-codec.version>
@@ -697,8 +702,7 @@
this parameter by invoking mvn with -Dbuild.id=$BUILD_ID-->
<build.id>${maven.build.timestamp}</build.id>
<shell-executable>bash</shell-executable>
- <!-- TODO HBASE-15041 clean up our javadocs so jdk8 linter can be used.
- property as of javadoc-plugin 3.0.0 -->
+ <!-- Still need this to ignore some errors when building javadoc-->
<doclint>none</doclint>
</properties>
<!-- Sorted by groups of dependencies then groupId and artifactId -->
@@ -1452,8 +1456,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>${compileSource}</source>
- <target>${compileSource}</target>
<showWarnings>true</showWarnings>
<showDeprecation>false</showDeprecation>
<useIncrementalCompilation>false</useIncrementalCompilation>
@@ -2487,7 +2489,7 @@
<docletArtifact>
<groupId>org.apache.yetus</groupId>
<artifactId>audience-annotations</artifactId>
- <version>${audience-annotations.version}</version>
+ <version>${javadoc.audience-annotations.version}</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<destDir>apidocs</destDir>
@@ -2544,7 +2546,7 @@
<docletArtifact>
<groupId>org.apache.yetus</groupId>
<artifactId>audience-annotations</artifactId>
- <version>${audience-annotations.version}</version>
+ <version>${javadoc.audience-annotations.version}</version>
</docletArtifact>
<useStandardDocletOptions>true</useStandardDocletOptions>
<destDir>testapidocs</destDir>
@@ -2645,18 +2647,17 @@
<profile>
<id>build-with-jdk8</id>
<activation>
- <jdk>[1.8,)</jdk>
+ <jdk>1.8</jdk>
</activation>
- <build>
- <pluginManagement>
- <plugins/>
- </pluginManagement>
- </build>
+ <properties>
+ <maven.compiler.source>${compileSource}</maven.compiler.source>
+ <maven.compiler.target>${compileSource}</maven.compiler.target>
+ </properties>
</profile>
<profile>
<id>build-with-jdk11</id>
<activation>
- <jdk>[1.11,)</jdk>
+ <jdk>[11,)</jdk>
</activation>
<properties>
<maven.compiler.release>${releaseTarget}</maven.compiler.release>
@@ -2669,8 +2670,36 @@
TODO: replicate logic for windows
-->
<surefire.Xmx>2200m</surefire.Xmx>
+ <!--
+ com.sun.javadoc and com.sun.tools.doclets are both deprecated in java 11 and will
+ fail the javadoc generating, so we need to use yetus 0.14.1 where it uses jdk.javadoc
+ and jdk.javadoc.doclet instead
+ -->
+ <javadoc.audience-annotations.version>0.14.1</javadoc.audience-annotations.version>
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${maven.javadoc.version}</version>
+ <configuration>
+ <source>${compileSource}</source>
+ <!--
+ Need to add this option to ignore the source errors, epsecially that we reference
+ test code in hbase-testing-util's main code.
+ -->
+ <additionalOptions>--ignore-source-errors</additionalOptions>
+ <additionalJOptions>
+ <additionalJOption>-J-Xmx2G</additionalJOption>
+ <additionalJOption>-J--add-exports</additionalJOption>
+ <additionalJOption>-Jjdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED</additionalJOption>
+ </additionalJOptions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>