File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,11 @@ RUN apt-get update && apt-get install -y openssh-server vim python3 --no-install
17
17
rm -rf /var/lib/apt/lists/* && \
18
18
service ssh start
19
19
20
+ COPY scripts/get-latest-maven-version.sh ./get-latest-maven-version.sh
21
+ RUN chmod +x ./get-latest-maven-version.sh
22
+
20
23
# Copy CDM jar & template files
21
- ARG MAVEN_VERSION=3.9.3
24
+ ARG MAVEN_VERSION=$(./get-latest-maven-version.sh)
22
25
ARG USER_HOME_DIR="/root"
23
26
ARG BASE_URL=https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries
24
27
ENV MAVEN_HOME /usr/share/maven
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ MAVEN_BASE_VERSION=3.9
4
+ MAVEN_REPO_URL=" https://archive.apache.org/dist/maven/maven-3/"
5
+
6
+ curl -sSL ${MAVEN_REPO_URL} | \
7
+ grep -o " ${MAVEN_BASE_VERSION} \.[0-9]*\/" | \
8
+ sort -V | \
9
+ tail -n1 | \
10
+ sed ' s/\///'
You can’t perform that action at this time.
0 commit comments