Skip to content

Commit 66d9402

Browse files
Update dependency maven-wrapper to v3.3.3
1 parent e37221d commit 66d9402

File tree

4 files changed

+27
-37
lines changed

4 files changed

+27
-37
lines changed

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* "License"); you may not use this file except in compliance
88
* with the License. You may obtain a copy of the License at
99
*
10-
* https://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an
@@ -30,7 +30,7 @@
3030
import java.util.concurrent.ThreadLocalRandom;
3131

3232
public final class MavenWrapperDownloader {
33-
private static final String WRAPPER_VERSION = "3.3.2";
33+
private static final String WRAPPER_VERSION = "3.3.3";
3434

3535
private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));
3636

.mvn/wrapper/maven-wrapper.properties

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
# Licensed to the Apache Software Foundation (ASF) under one
2-
# or more contributor license agreements. See the NOTICE file
3-
# distributed with this work for additional information
4-
# regarding copyright ownership. The ASF licenses this file
5-
# to you under the Apache License, Version 2.0 (the
6-
# "License"); you may not use this file except in compliance
7-
# with the License. You may obtain a copy of the License at
8-
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing,
12-
# software distributed under the License is distributed on an
13-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
15-
# specific language governing permissions and limitations
16-
# under the License.
17-
wrapperVersion=3.3.2
181
distributionType=source
192
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
20-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
3+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar
4+
wrapperVersion=3.3.3

mvnw

Lines changed: 19 additions & 13 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-
# Apache Maven Wrapper startup batch script, version 3.3.2
22+
# Apache Maven Wrapper startup batch script, version 3.3.3
2323
#
2424
# Required ENV vars:
2525
# ------------------
@@ -201,6 +201,14 @@ MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
201201
export MAVEN_PROJECTBASEDIR
202202
log "$MAVEN_PROJECTBASEDIR"
203203

204+
trim() {
205+
# MWRAPPER-139:
206+
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
207+
# Needed for removing poorly interpreted newline sequences when running in more
208+
# exotic environments such as mingw bash on Windows.
209+
printf "%s" "${1}" | tr -d '[:space:]'
210+
}
211+
204212
##########################################################################################
205213
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
206214
# This allows using the maven wrapper in projects that prohibit checking in binary data.
@@ -212,15 +220,13 @@ else
212220
log "Couldn't find $wrapperJarPath, downloading it ..."
213221

214222
if [ -n "$MVNW_REPOURL" ]; then
215-
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar"
223+
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar"
216224
else
217-
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar"
225+
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar"
218226
fi
219227
while IFS="=" read -r key value; do
220-
# Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
221-
safeValue=$(echo "$value" | tr -d '\r')
222228
case "$key" in wrapperUrl)
223-
wrapperUrl="$safeValue"
229+
wrapperUrl=$(trim "${value-}")
224230
break
225231
;;
226232
esac
@@ -235,17 +241,17 @@ else
235241
log "Found wget ... using wget"
236242
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
237243
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
238-
wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
244+
wget ${QUIET:+"$QUIET"} "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
239245
else
240-
wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
246+
wget ${QUIET:+"$QUIET"} --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
241247
fi
242248
elif command -v curl >/dev/null; then
243249
log "Found curl ... using curl"
244250
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
245251
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
246-
curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
252+
curl ${QUIET:+"$QUIET"} -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
247253
else
248-
curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
254+
curl ${QUIET:+"$QUIET"} --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
249255
fi
250256
else
251257
log "Falling back to using Java to download"
@@ -276,15 +282,15 @@ fi
276282
wrapperSha256Sum=""
277283
while IFS="=" read -r key value; do
278284
case "$key" in wrapperSha256Sum)
279-
wrapperSha256Sum=$value
285+
wrapperSha256Sum=$(trim "${value-}")
280286
break
281287
;;
282288
esac
283289
done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
284290
if [ -n "$wrapperSha256Sum" ]; then
285291
wrapperSha256Result=false
286292
if command -v sha256sum >/dev/null; then
287-
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c >/dev/null 2>&1; then
293+
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c - >/dev/null 2>&1; then
288294
wrapperSha256Result=true
289295
fi
290296
elif command -v shasum >/dev/null; then

mvnw.cmd

Lines changed: 4 additions & 4 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,7 +18,7 @@
1818
@REM ----------------------------------------------------------------------------
1919

2020
@REM ----------------------------------------------------------------------------
21-
@REM Apache Maven Wrapper startup batch script, version 3.3.2
21+
@REM Apache Maven Wrapper startup batch script, version 3.3.3
2222
@REM
2323
@REM Required ENV vars:
2424
@REM JAVA_HOME - location of a JDK home dir
@@ -119,7 +119,7 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
119119
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
120120
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
121121

122-
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar"
122+
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar"
123123

124124
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
125125
IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
@@ -133,7 +133,7 @@ if exist %WRAPPER_JAR% (
133133
)
134134
) else (
135135
if not "%MVNW_REPOURL%" == "" (
136-
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar"
136+
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar"
137137
)
138138
if "%MVNW_VERBOSE%" == "true" (
139139
echo Couldn't find %WRAPPER_JAR%, downloading it ...

0 commit comments

Comments
 (0)