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

snuyanzin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-ci-docker.git

commit 8dfed6577203666b55f39f66657136da04b1af06
Author: Chesnay Schepler <[email protected]>
AuthorDate: Wed Nov 27 10:07:19 2024 +0100

    Revert "[FLINK-34194][ci] Removes Maven setup"
    
    This reverts commit cca66a0441eda971a474edaeec91a05d29e0face.
    
    Eases transition to Ubuntu 22 as some scripts rely on mvn directly.
---
 base/Dockerfile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/base/Dockerfile b/base/Dockerfile
index bfdfb32..4018c3b 100644
--- a/base/Dockerfile
+++ b/base/Dockerfile
@@ -84,6 +84,19 @@ RUN mkdir -p /usr/share/hugo \
  && rm -f /tmp/hugo.tar.gz \
  && ln -s /usr/share/hugo/hugo /usr/bin/hugo
 
+# Install maven
+ARG MAVEN_VERSION=3.8.6
+ARG USER_HOME_DIR="/root"
+ARG 
BASE_URL=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${MAVEN_VERSION}
+
+RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
+  && curl -fsSL -o /tmp/apache-maven.tar.gz 
${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
+  && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven 
--strip-components=1 \
+  && rm -f /tmp/apache-maven.tar.gz \
+  && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
+
+ENV MAVEN_HOME /usr/share/maven
+
 # Use UTF-8
 RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen ; locale-gen ; update-locale 
en_US.UTF-8
 ENV LC_ALL "en_US.UTF-8"

Reply via email to