File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ ARG JMX_EXPORTER
135135ARG TARGETARCH
136136ARG TINI
137137ARG STACKABLE_USER_UID
138+ ARG MAVEN_VERSION="3.9.8"
138139
139140WORKDIR /stackable/spark-${PRODUCT}
140141
@@ -146,17 +147,26 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=spark-source-builder \
146147# Compiling the tests takes a lot of time, so we skip them
147148# -Dmaven.test.skip=true skips both the compilation and execution of tests
148149# -DskipTests skips only the execution
149- #
150- # This will download it's own version of maven because the UBI version is too old:
151- # 134.0 [ERROR] Detected Maven Version: 3.6.3 is not in the allowed range [3.8.8,)
152- RUN export MAVEN_OPTS="-Xss64m -Xmx2g -XX:ReservedCodeCacheSize=1g" \
153- && ./dev/make-distribution.sh \
150+ RUN <<EOF
151+ # We download the Maven binary from our own repository because:
152+ #
153+ # 1. Cannot use the UBI maven version because it's too old:
154+ # 134.0 [ERROR] Detected Maven Version: 3.6.3 is not in the allowed range [3.8.8,)
155+ # 2. Cannot allow Spark to download its own version of Maven from archive.apache.org because the connection is not reliable.
156+ cd /tmp
157+ curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC .
158+
159+ export MAVEN_OPTS="-Xss64m -Xmx2g -XX:ReservedCodeCacheSize=1g"
160+
161+ ./dev/make-distribution.sh \
162+ --mvn /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn \
154163 -Dhadoop.version="$HADOOP" \
155164 -Dmaven.test.skip=true \
156165 -DskipTests \
157166 -P'hadoop-3' -Pkubernetes -Phive -Phive-thriftserver \
158167 --no-transfer-progress \
159168 --batch-mode
169+ EOF
160170
161171# <<< Build spark
162172
You can’t perform that action at this time.
0 commit comments