This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new cf96eed0d7 [deploy] Fix empty javadoc jar when building with JDK 8 
(#7658)
cf96eed0d7 is described below

commit cf96eed0d70b88a877bd999f422499ec64d30ee3
Author: littlecoder04 <[email protected]>
AuthorDate: Thu Apr 16 12:09:19 2026 +0800

    [deploy] Fix empty javadoc jar when building with JDK 8 (#7658)
    
    The --ignore-source-errors flag is only supported by JDK 9+. Move it to
    a JDK 9+ activated profile so that JDK 8 builds can generate javadoc
    correctly.
    
    ### Before:
    Only META-INF files are generated in doc jar with JDK8
    Doc jar looks good in JDK11 and JDK17.
    
    ### After:
    Doc jar looks good in JDK8, JDK11 and JDK17.
---
 pom.xml | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 63c8e19b6c..50d7868f08 100644
--- a/pom.xml
+++ b/pom.xml
@@ -514,6 +514,31 @@ under the License.
             </activation>
         </profile>
 
+        <profile>
+            <!-- JDK 9+ supports the ignore-source-errors flag for javadoc -->
+            <id>javadoc-jdk9+</id>
+            <activation>
+                <jdk>[9,)</jdk>
+            </activation>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-javadoc-plugin</artifactId>
+                            <configuration>
+                                <release>8</release>
+                                <additionalJOptions combine.children="append">
+                                    <!-- Suppress the error that is accepted 
by JDK 8 but not by JDK 11. -->
+                                    
<additionalJOption>--ignore-source-errors</additionalJOption>
+                                </additionalJOptions>
+                            </configuration>
+                        </plugin>
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
+
         <profile>
             <id>fast-build</id>
             <properties>
@@ -1046,12 +1071,10 @@ under the License.
                     <configuration>
                         <quiet>true</quiet>
                         <detectOfflineLinks>false</detectOfflineLinks>
-                        <release>8</release>
+                        <source>8</source>
                         <failOnError>false</failOnError>
                         <additionalJOptions>
                             
<additionalJOption>-Xdoclint:none</additionalJOption>
-                            <!-- Suppress the error that is accepted by JDK 8 
but not by JDK 11. -->
-                            
<additionalJOption>--ignore-source-errors</additionalJOption>
                         </additionalJOptions>
                     </configuration>
                 </plugin>

Reply via email to