Skip to content

Commit

Permalink
Move maven global work directory to /opt/maven
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Oct 28, 2024
1 parent dab1465 commit 8cad5b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions maven-check-versions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ HEALTHCHECK NONE

ENTRYPOINT []

RUN mkdir -p /opt/maven && chmod 777 /opt/maven

COPY maven-check-versions.sh /opt/

ARG MAVEN_OPTS="-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
Expand Down
2 changes: 1 addition & 1 deletion maven-check-versions/maven-check-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ -f mvnw ]; then
cmd='./mvnw'
# Ensure maven wrapper work directory is somewhere we have
# write permissions
export MAVEN_USER_HOME="$(\pwd)/.m2"
export MAVEN_USER_HOME="/opt/maven/.m2"
if [ -n "${MAVEN_CONFIG+x}" ]; then
# resolve conflict with mvnw
unset MAVEN_CONFIG
Expand Down

0 comments on commit 8cad5b0

Please sign in to comment.