Skip to content

Commit

Permalink
Merge pull request #3 from l3r8yJ/master
Browse files Browse the repository at this point in the history
3.8.7
  • Loading branch information
l3r8yJ authored Feb 26, 2023
2 parents 0933298 + 25c9e4f commit 412e322
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,19 @@ RUN cd /usr/lib/jvm/ && ls -a
RUN echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> /root/.profile
RUN bash -c '[[ "$(javac --version)" =~ "17.0" ]]'

RUN sudo apt-get -y install maven
RUN mvn -version
# Maven
ENV MAVEN_VERSION 3.8.7
ENV M2_HOME "/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}"
RUN echo 'export M2_HOME=/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}' >> /root/.profile
RUN wget --quiet "https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" && \
mkdir -p /usr/local/apache-maven && \
mv "apache-maven-${MAVEN_VERSION}-bin.tar.gz" /usr/local/apache-maven && \
tar xzvf "/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" -C /usr/local/apache-maven/ && \
update-alternatives --install /usr/bin/mvn mvn "${M2_HOME}/bin/mvn" 1 && \
update-alternatives --config mvn && \
mvn -version
COPY settings.xml /root/.m2/settings.xml
RUN bash -c '[[ "$(mvn --version)" =~ "${MAVEN_VERSION}" ]]'

# Clean up
RUN rm -rf /tmp/*
Expand Down

0 comments on commit 412e322

Please sign in to comment.