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

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


The following commit(s) were added to refs/heads/master by this push:
     new 43904a933634 fix(build): resolve same-module Scala classes when 
generating javadoc (#20238)
43904a933634 is described below

commit 43904a9336345cb1a855a17f33e3173b9e74ed35
Author: Y Ethan Guo <[email protected]>
AuthorDate: Thu Oct 8 19:20:35 2026 -0700

    fix(build): resolve same-module Scala classes when generating javadoc 
(#20238)
---
 .github/workflows/bot.yml |  2 +-
 pom.xml                   | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml
index ae3deffc293e..3bcd4c7ad8af 100644
--- a/.github/workflows/bot.yml
+++ b/.github/workflows/bot.yml
@@ -1379,7 +1379,7 @@ jobs:
           FLINK_AVRO_VERSION: ${{ matrix.flinkAvroVersion }}
           FLINK_PARQUET_VERSION: ${{ matrix.flinkParquetVersion }}
         run: |
-          mvn clean package -T 2 -Pjava17 -D"$SCALA_PROFILE" 
-D"$SPARK_PROFILE" -DdeployArtifacts=true -DskipTests=true 
-Dmaven.javadoc.skip=true $MVN_ARGS -pl 
packaging/hudi-hadoop-mr-bundle,packaging/hudi-spark-bundle,packaging/hudi-utilities-bundle,packaging/hudi-utilities-slim-bundle,packaging/hudi-cli-bundle
 -am
+          mvn clean package -T 2 -Pjava17 -D"$SCALA_PROFILE" 
-D"$SPARK_PROFILE" -DdeployArtifacts=true -DskipTests=true $MVN_ARGS -pl 
packaging/hudi-hadoop-mr-bundle,packaging/hudi-spark-bundle,packaging/hudi-utilities-bundle,packaging/hudi-utilities-slim-bundle,packaging/hudi-cli-bundle
 -am
       - name: Validate Bundle UI Assets
         if: needs.changes.outputs.relevant == 'true'
         run: ./scripts/release/validate_bundle_ui_assets.sh
diff --git a/pom.xml b/pom.xml
index 9866ba3c0d41..ad4068c129d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2116,8 +2116,18 @@
             <configuration>
               <source>11</source>
               <doclint>none</doclint>
-              <failOnWarnings>false</failOnWarnings>
-              <failOnError>false</failOnError>
+              <!-- javadoc only puts dependency artifacts on its classpath, 
never the module's own output
+                   directory, so Java sources that import Scala classes 
compiled in the same module fail to
+                   resolve them. Put the module's own jar (built earlier in 
the package phase) on the classpath. -->
+              <additionalDependencies>
+                <additionalDependency>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>${project.artifactId}</artifactId>
+                  <version>${project.version}</version>
+                  <scope>system</scope>
+                  
<systemPath>${project.build.directory}/${project.build.finalName}.jar</systemPath>
+                </additionalDependency>
+              </additionalDependencies>
             </configuration>
           </plugin>
           <plugin>

Reply via email to