@@ -135,6 +135,9 @@ ARG JMX_EXPORTER
135
135
ARG TARGETARCH
136
136
ARG TINI
137
137
ARG STACKABLE_USER_UID
138
+ # Find the latest version here: https://github.com/apache/maven
139
+ # renovate: datasource=github-tags packageName=apache/maven
140
+ ARG MAVEN_VERSION="3.9.10"
138
141
139
142
WORKDIR /stackable/spark-${PRODUCT}
140
143
@@ -146,17 +149,25 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=spark-source-builder \
146
149
# Compiling the tests takes a lot of time, so we skip them
147
150
# -Dmaven.test.skip=true skips both the compilation and execution of tests
148
151
# -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 \
152
+ RUN <<EOF
153
+ # We download the Maven binary from our own repository because:
154
+ #
155
+ # 1. Cannot use the UBI maven version because it's too old:
156
+ # 134.0 [ERROR] Detected Maven Version: 3.6.3 is not in the allowed range [3.8.8,)
157
+ # 2. Cannot allow Spark to download its own version of Maven from archive.apache.org because the connection is not reliable.
158
+ curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC /tmp
159
+
160
+ export MAVEN_OPTS="-Xss64m -Xmx2g -XX:ReservedCodeCacheSize=1g"
161
+
162
+ ./dev/make-distribution.sh \
163
+ --mvn /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn \
154
164
-Dhadoop.version="$HADOOP" \
155
165
-Dmaven.test.skip=true \
156
166
-DskipTests \
157
167
-P'hadoop-3' -Pkubernetes -Phive -Phive-thriftserver \
158
168
--no-transfer-progress \
159
169
--batch-mode
170
+ EOF
160
171
161
172
# <<< Build spark
162
173
0 commit comments