Skip to content

Commit 096497f

Browse files
committed
Upgrade Maven
1 parent abb0471 commit 096497f

File tree

5 files changed

+37
-22
lines changed

5 files changed

+37
-22
lines changed

.mvn/wrapper/MavenWrapperDownloader.java

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
public class MavenWrapperDownloader {
2222

23-
private static final String WRAPPER_VERSION = "0.5.3";
23+
private static final String WRAPPER_VERSION = "0.5.6";
2424
/**
2525
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
2626
*/
2727
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
28-
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + " .jar";
28+
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
2929

3030
/**
3131
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to

.mvn/wrapper/maven-wrapper.jar

100755100644
1 Byte
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

mvnw

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "License"); you may not use this file except in compliance
99
# with the License. You may obtain a copy of the License at
1010
#
11-
# https://www.apache.org/licenses/LICENSE-2.0
11+
# http://www.apache.org/licenses/LICENSE-2.0
1212
#
1313
# Unless required by applicable law or agreed to in writing,
1414
# software distributed under the License is distributed on an
@@ -19,7 +19,7 @@
1919
# ----------------------------------------------------------------------------
2020

2121
# ----------------------------------------------------------------------------
22-
# Maven2 Start Up Batch script
22+
# Maven Start Up Batch script
2323
#
2424
# Required ENV vars:
2525
# ------------------
@@ -212,9 +212,9 @@ else
212212
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
213213
fi
214214
if [ -n "$MVNW_REPOURL" ]; then
215-
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
215+
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
216216
else
217-
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
217+
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
218218
fi
219219
while IFS="=" read key value; do
220220
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
@@ -246,7 +246,7 @@ else
246246
else
247247
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
248248
fi
249-
249+
250250
else
251251
if [ "$MVNW_VERBOSE" = true ]; then
252252
echo "Falling back to using Java to download"
@@ -296,6 +296,11 @@ if $cygwin; then
296296
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
297297
fi
298298

299+
# Provide a "standardized" way to retrieve the CLI args that will
300+
# work with both Windows and non-Windows executions.
301+
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
302+
export MAVEN_CMD_LINE_ARGS
303+
299304
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
300305

301306
exec "$JAVACMD" \

mvnw.cmd

100755100644
Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@REM "License"); you may not use this file except in compliance
88
@REM with the License. You may obtain a copy of the License at
99
@REM
10-
@REM https://www.apache.org/licenses/LICENSE-2.0
10+
@REM http://www.apache.org/licenses/LICENSE-2.0
1111
@REM
1212
@REM Unless required by applicable law or agreed to in writing,
1313
@REM software distributed under the License is distributed on an
@@ -18,15 +18,15 @@
1818
@REM ----------------------------------------------------------------------------
1919

2020
@REM ----------------------------------------------------------------------------
21-
@REM Maven2 Start Up Batch script
21+
@REM Maven Start Up Batch script
2222
@REM
2323
@REM Required ENV vars:
2424
@REM JAVA_HOME - location of a JDK home dir
2525
@REM
2626
@REM Optional ENV vars
2727
@REM M2_HOME - location of maven2's installed home dir
2828
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29-
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
29+
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
3030
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
3131
@REM e.g. to debug Maven itself, use
3232
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -37,7 +37,7 @@
3737
@echo off
3838
@REM set title of command window
3939
title %0
40-
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
40+
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
4141
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
4242

4343
@REM set %HOME% to equivalent of $HOME
@@ -120,7 +120,7 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120120
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121121
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122122

123-
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
123+
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
124124

125125
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126126
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
@@ -129,25 +129,35 @@ FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-
129129
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130130
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131131
if exist %WRAPPER_JAR% (
132-
echo Found %WRAPPER_JAR%
132+
if "%MVNW_VERBOSE%" == "true" (
133+
echo Found %WRAPPER_JAR%
134+
)
133135
) else (
134-
if not "%MVNW_REPOURL%" == "" (
135-
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
136-
)
137-
echo Couldn't find %WRAPPER_JAR%, downloading it ...
138-
echo Downloading from: %DOWNLOAD_URL%
139-
136+
if not "%MVNW_REPOURL%" == "" (
137+
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
138+
)
139+
if "%MVNW_VERBOSE%" == "true" (
140+
echo Couldn't find %WRAPPER_JAR%, downloading it ...
141+
echo Downloading from: %DOWNLOAD_URL%
142+
)
143+
140144
powershell -Command "&{"^
141145
"$webclient = new-object System.Net.WebClient;"^
142146
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
143147
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
144148
"}"^
145149
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
146150
"}"
147-
echo Finished downloading %WRAPPER_JAR%
151+
if "%MVNW_VERBOSE%" == "true" (
152+
echo Finished downloading %WRAPPER_JAR%
153+
)
148154
)
149155
@REM End of extension
150156

157+
@REM Provide a "standardized" way to retrieve the CLI args that will
158+
@REM work with both Windows and non-Windows executions.
159+
set MAVEN_CMD_LINE_ARGS=%*
160+
151161
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
152162
if ERRORLEVEL 1 goto error
153163
goto end

0 commit comments

Comments
 (0)