usage of MVNW_REPOURL for wrapper download

This commit is contained in:
Manfred Moser 2019-02-18 22:47:51 -08:00 committed by rfscholte
parent f81d0677ea
commit 67e12c5266
2 changed files with 8 additions and 1 deletions

6
maven-wrapper/mvnw vendored
View File

@ -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

View File

@ -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%