From e93b2460cafcacd854d443be162297a2f36c3f9b Mon Sep 17 00:00:00 2001 From: Frank Delporte Date: Sat, 16 Nov 2024 16:43:32 +0100 Subject: [PATCH] Include Maven 3.9.4 --- pi4j-builder-base/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pi4j-builder-base/Dockerfile b/pi4j-builder-base/Dockerfile index 31f57ae..a61e254 100644 --- a/pi4j-builder-base/Dockerfile +++ b/pi4j-builder-base/Dockerfile @@ -34,7 +34,15 @@ RUN apt-get install --yes openjdk-21-jdk-headless ENV JAVA_HOME="/usr/lib/jvm/java-21-openjdk-$TARGETARCH/" # install Apache Maven -RUN apt-get install --yes maven +ENV MAVEN_VERSION=3.9.4 +ENV MAVEN_HOME=/opt/maven +ENV PATH=${MAVEN_HOME}/bin:${PATH} + +# Install Maven +RUN apt-get install -y curl tar && \ + curl -fsSL https://downloads.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | tar -xz -C /opt && \ + mv /opt/apache-maven-${MAVEN_VERSION} ${MAVEN_HOME} && \ + rm -rf /var/lib/apt/lists/* # configure Maven with custom settings for defined M2 repository path COPY maven-settings.xml /usr/share/maven/conf/settings.xml