diff --git a/maven-wrapper/mvnw b/maven-wrapper/mvnw index 24e1b87ad2..f4cc0c8b5b 100755 --- a/maven-wrapper/mvnw +++ b/maven-wrapper/mvnw @@ -211,7 +211,11 @@ else if [ "$MVNW_VERBOSE" = true ]; then echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." fi - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + if [ "$MVNW_REPOURL" = true]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + fi while IFS="=" read key value; do case "$key" in (wrapperUrl) jarUrl="$value"; break ;; esac diff --git a/maven-wrapper/mvnw.cmd b/maven-wrapper/mvnw.cmd index 64c4ecda9b..13b1a3d1ef 100644 --- a/maven-wrapper/mvnw.cmd +++ b/maven-wrapper/mvnw.cmd @@ -130,6 +130,9 @@ FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven- if exist %WRAPPER_JAR% ( echo Found %WRAPPER_JAR% ) else ( + if exist %MVNW_REPOURL% ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + ) echo Couldn't find %WRAPPER_JAR%, downloading it ... echo Downloading from: %DOWNLOAD_URL%