Skip to content

Commit 80838a5

Browse files
committed
Revert "Update Maven to 3.8.5"
This reverts commit 543f60a.
1 parent a30434e commit 80838a5

File tree

3 files changed

+18
-152
lines changed

3 files changed

+18
-152
lines changed

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.1.1/apache-maven-3.1.1-bin.zip

mvnw

Lines changed: 4 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# ----------------------------------------------------------------------------
2020

2121
# ----------------------------------------------------------------------------
22-
# Maven Start Up Batch script
22+
# Maven2 Start Up Batch script
2323
#
2424
# Required ENV vars:
2525
# ------------------
@@ -36,10 +36,6 @@
3636

3737
if [ -z "$MAVEN_SKIP_RC" ] ; then
3838

39-
if [ -f /usr/local/etc/mavenrc ] ; then
40-
. /usr/local/etc/mavenrc
41-
fi
42-
4339
if [ -f /etc/mavenrc ] ; then
4440
. /etc/mavenrc
4541
fi
@@ -118,6 +114,7 @@ if $mingw ; then
118114
M2_HOME="`(cd "$M2_HOME"; pwd)`"
119115
[ -n "$JAVA_HOME" ] &&
120116
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117+
# TODO classpath?
121118
fi
122119

123120
if [ -z "$JAVA_HOME" ]; then
@@ -149,7 +146,7 @@ if [ -z "$JAVACMD" ] ; then
149146
JAVACMD="$JAVA_HOME/bin/java"
150147
fi
151148
else
152-
JAVACMD="`\\unset -f command; \\command -v java`"
149+
JAVACMD="`which java`"
153150
fi
154151
fi
155152

@@ -203,85 +200,6 @@ if [ -z "$BASE_DIR" ]; then
203200
exit 1;
204201
fi
205202

206-
##########################################################################################
207-
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
208-
# This allows using the maven wrapper in projects that prohibit checking in binary data.
209-
##########################################################################################
210-
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
211-
if [ "$MVNW_VERBOSE" = true ]; then
212-
echo "Found .mvn/wrapper/maven-wrapper.jar"
213-
fi
214-
else
215-
if [ "$MVNW_VERBOSE" = true ]; then
216-
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
217-
fi
218-
if [ -n "$MVNW_REPOURL" ]; then
219-
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
220-
else
221-
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
222-
fi
223-
while IFS="=" read key value; do
224-
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
225-
esac
226-
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
227-
if [ "$MVNW_VERBOSE" = true ]; then
228-
echo "Downloading from: $jarUrl"
229-
fi
230-
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
231-
if $cygwin; then
232-
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
233-
fi
234-
235-
if command -v wget > /dev/null; then
236-
if [ "$MVNW_VERBOSE" = true ]; then
237-
echo "Found wget ... using wget"
238-
fi
239-
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
240-
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
241-
else
242-
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
243-
fi
244-
elif command -v curl > /dev/null; then
245-
if [ "$MVNW_VERBOSE" = true ]; then
246-
echo "Found curl ... using curl"
247-
fi
248-
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
249-
curl -o "$wrapperJarPath" "$jarUrl" -f
250-
else
251-
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
252-
fi
253-
254-
else
255-
if [ "$MVNW_VERBOSE" = true ]; then
256-
echo "Falling back to using Java to download"
257-
fi
258-
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
259-
# For Cygwin, switch paths to Windows format before running javac
260-
if $cygwin; then
261-
javaClass=`cygpath --path --windows "$javaClass"`
262-
fi
263-
if [ -e "$javaClass" ]; then
264-
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
265-
if [ "$MVNW_VERBOSE" = true ]; then
266-
echo " - Compiling MavenWrapperDownloader.java ..."
267-
fi
268-
# Compiling the Java class
269-
("$JAVA_HOME/bin/javac" "$javaClass")
270-
fi
271-
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
272-
# Running the downloader
273-
if [ "$MVNW_VERBOSE" = true ]; then
274-
echo " - Running MavenWrapperDownloader.java ..."
275-
fi
276-
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
277-
fi
278-
fi
279-
fi
280-
fi
281-
##########################################################################################
282-
# End of extension
283-
##########################################################################################
284-
285203
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
286204
if [ "$MVNW_VERBOSE" = true ]; then
287205
echo $MAVEN_PROJECTBASEDIR
@@ -300,17 +218,10 @@ if $cygwin; then
300218
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
301219
fi
302220

303-
# Provide a "standardized" way to retrieve the CLI args that will
304-
# work with both Windows and non-Windows executions.
305-
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
306-
export MAVEN_CMD_LINE_ARGS
307-
308221
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
309222

310223
exec "$JAVACMD" \
311224
$MAVEN_OPTS \
312-
$MAVEN_DEBUG_OPTS \
313225
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
314-
"-Dmaven.home=${M2_HOME}" \
315-
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
226+
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
316227
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

mvnw.cmd

100644100755
Lines changed: 13 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
@REM ----------------------------------------------------------------------------
1919

2020
@REM ----------------------------------------------------------------------------
21-
@REM Maven Start Up Batch script
21+
@REM Maven2 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 keystroke before ending
29+
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke 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
@@ -35,9 +35,7 @@
3535

3636
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
3737
@echo off
38-
@REM set title of command window
39-
title %0
40-
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
38+
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
4139
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
4240

4341
@REM set %HOME% to equivalent of $HOME
@@ -46,8 +44,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
4644
@REM Execute a user defined script before this one
4745
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
4846
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
49-
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
50-
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
47+
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48+
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
5149
:skipRcPre
5250

5351
@setlocal
@@ -117,54 +115,11 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
117115
:endReadAdditionalConfig
118116

119117
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
118+
120119
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121120
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122121

123-
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
124-
125-
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126-
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127-
)
128-
129-
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130-
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131-
if exist %WRAPPER_JAR% (
132-
if "%MVNW_VERBOSE%" == "true" (
133-
echo Found %WRAPPER_JAR%
134-
)
135-
) else (
136-
if not "%MVNW_REPOURL%" == "" (
137-
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
138-
)
139-
if "%MVNW_VERBOSE%" == "true" (
140-
echo Couldn't find %WRAPPER_JAR%, downloading it ...
141-
echo Downloading from: %DOWNLOAD_URL%
142-
)
143-
144-
powershell -Command "&{"^
145-
"$webclient = new-object System.Net.WebClient;"^
146-
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
147-
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
148-
"}"^
149-
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
150-
"}"
151-
if "%MVNW_VERBOSE%" == "true" (
152-
echo Finished downloading %WRAPPER_JAR%
153-
)
154-
)
155-
@REM End of extension
156-
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-
161-
%MAVEN_JAVA_EXE% ^
162-
%JVM_CONFIG_MAVEN_PROPS% ^
163-
%MAVEN_OPTS% ^
164-
%MAVEN_DEBUG_OPTS% ^
165-
-classpath %WRAPPER_JAR% ^
166-
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
167-
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
122+
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
168123
if ERRORLEVEL 1 goto error
169124
goto end
170125

@@ -174,15 +129,15 @@ set ERROR_CODE=1
174129
:end
175130
@endlocal & set ERROR_CODE=%ERROR_CODE%
176131

177-
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
132+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
178133
@REM check for post script, once with legacy .bat ending and once with .cmd ending
179-
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
180-
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
134+
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
135+
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
181136
:skipRcPost
182137

183138
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
184-
if "%MAVEN_BATCH_PAUSE%"=="on" pause
139+
if "%MAVEN_BATCH_PAUSE%" == "on" pause
185140

186-
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
141+
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
187142

188-
cmd /C exit /B %ERROR_CODE%
143+
exit /B %ERROR_CODE%

0 commit comments

Comments
 (0)