Skip to content

Commit 3c4df97

Browse files
committed
override javadoc
Signed-off-by: Yanxuan Liu <[email protected]>
1 parent 0587458 commit 3c4df97

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

java/ci/build-in-docker.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ BUILD_ARG=(
9090

9191
if [ "$SIGN_FILE" == true ]; then
9292
# Build javadoc and sources only when SIGN_FILE is true
93-
BUILD_ARG+=("-Prelease")
93+
if [ $BUILD_JAVADOC_JDK17 == true ]; then
94+
# Generate javadoc with JDK 17
95+
yum install -y java-17-openjdk-devel
96+
export JDK17_HOME=/usr/lib/jvm/java-17-openjdk
97+
BUILD_ARG+=("-Prelease,javadoc")
98+
else
99+
BUILD_ARG+=("-Prelease")
94100
fi
95101

96102
if [ -f "$WORKSPACE/java/ci/settings.xml" ]; then
@@ -101,12 +107,6 @@ fi
101107
cd "$WORKSPACE/java"
102108
CUDF_INSTALL_DIR="$INSTALL_PREFIX" mvn -B clean package "${BUILD_ARG[@]}"
103109

104-
# Generate javadoc with JDK 17
105-
if [ $BUILD_JAVADOC_JDK17 == true ]; then
106-
yum install -y java-17-openjdk-devel
107-
export JDK17_HOME=/usr/lib/jvm/java-17-openjdk
108-
CUDF_INSTALL_DIR="$INSTALL_PREFIX" mvn -B javadoc:jar -P javadoc
109-
fi
110110

111111
###### Stash Jar files ######
112112
rm -rf "$OUT_PATH"

java/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,15 @@
359359
</build>
360360
</profile>
361361
<profile>
362-
<id>javadoc</id>
362+
<id>javadoc-jdk17</id>
363363
<build>
364364
<plugins>
365365
<plugin>
366366
<groupId>org.apache.maven.plugins</groupId>
367367
<artifactId>maven-javadoc-plugin</artifactId>
368368
<version>3.6.3</version>
369369
<configuration>
370-
<classifier>javadoc-jdk17</classifier>
370+
<classifier>javadoc</classifier>
371371
<additionalJOptions>
372372
<additionalJOption>-Xdoclint:none</additionalJOption>
373373
</additionalJOptions>

0 commit comments

Comments
 (0)