Skip to content

Commit 5c583a1

Browse files
committed
HBX-3111: Update Maven version to 3.9.11 and Maven wrapper version to 3.3.3
- update 'maven-wrapper-plugin.version' in 'pom.xml' to 3.3.3 - update 'maven.min.version' in 'pom.xml' to 3.9.11 - run 'mvn wrapper:wrapper' to regenerate the maven wrapper scripts Signed-off-by: Koen Aers <[email protected]>
1 parent 13d60eb commit 5c583a1

File tree

5 files changed

+549
-21
lines changed

5 files changed

+549
-21
lines changed

.mvn/wrapper/maven-wrapper.jar

62 Bytes
Binary file not shown.
Lines changed: 3 additions & 19 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-
# http://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=bin
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-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
2+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
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: 338 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,338 @@
1+
#!/bin/sh
2+
# ----------------------------------------------------------------------------
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
# ----------------------------------------------------------------------------
20+
21+
# ----------------------------------------------------------------------------
22+
# Apache Maven Wrapper startup batch script, version 3.3.3
23+
#
24+
# Required ENV vars:
25+
# ------------------
26+
# JAVA_HOME - location of a JDK home dir
27+
#
28+
# Optional ENV vars
29+
# -----------------
30+
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
31+
# e.g. to debug Maven itself, use
32+
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33+
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34+
# ----------------------------------------------------------------------------
35+
36+
if [ -z "$MAVEN_SKIP_RC" ]; then
37+
38+
if [ -f /usr/local/etc/mavenrc ]; then
39+
. /usr/local/etc/mavenrc
40+
fi
41+
42+
if [ -f /etc/mavenrc ]; then
43+
. /etc/mavenrc
44+
fi
45+
46+
if [ -f "$HOME/.mavenrc" ]; then
47+
. "$HOME/.mavenrc"
48+
fi
49+
50+
fi
51+
52+
# OS specific support. $var _must_ be set to either true or false.
53+
cygwin=false
54+
darwin=false
55+
mingw=false
56+
case "$(uname)" in
57+
CYGWIN*) cygwin=true ;;
58+
MINGW*) mingw=true ;;
59+
Darwin*)
60+
darwin=true
61+
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
62+
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
63+
if [ -z "$JAVA_HOME" ]; then
64+
if [ -x "/usr/libexec/java_home" ]; then
65+
JAVA_HOME="$(/usr/libexec/java_home)"
66+
export JAVA_HOME
67+
else
68+
JAVA_HOME="/Library/Java/Home"
69+
export JAVA_HOME
70+
fi
71+
fi
72+
;;
73+
esac
74+
75+
if [ -z "$JAVA_HOME" ]; then
76+
if [ -r /etc/gentoo-release ]; then
77+
JAVA_HOME=$(java-config --jre-home)
78+
fi
79+
fi
80+
81+
# For Cygwin, ensure paths are in UNIX format before anything is touched
82+
if $cygwin; then
83+
[ -n "$JAVA_HOME" ] \
84+
&& JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
85+
[ -n "$CLASSPATH" ] \
86+
&& CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
87+
fi
88+
89+
# For Mingw, ensure paths are in UNIX format before anything is touched
90+
if $mingw; then
91+
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] \
92+
&& JAVA_HOME="$(
93+
cd "$JAVA_HOME" || (
94+
echo "cannot cd into $JAVA_HOME." >&2
95+
exit 1
96+
)
97+
pwd
98+
)"
99+
fi
100+
101+
if [ -z "$JAVA_HOME" ]; then
102+
javaExecutable="$(which javac)"
103+
if [ -n "$javaExecutable" ] && ! [ "$(expr "$javaExecutable" : '\([^ ]*\)')" = "no" ]; then
104+
# readlink(1) is not available as standard on Solaris 10.
105+
readLink=$(which readlink)
106+
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
107+
if $darwin; then
108+
javaHome="$(dirname "$javaExecutable")"
109+
javaExecutable="$(cd "$javaHome" && pwd -P)/javac"
110+
else
111+
javaExecutable="$(readlink -f "$javaExecutable")"
112+
fi
113+
javaHome="$(dirname "$javaExecutable")"
114+
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
115+
JAVA_HOME="$javaHome"
116+
export JAVA_HOME
117+
fi
118+
fi
119+
fi
120+
121+
if [ -z "$JAVACMD" ]; then
122+
if [ -n "$JAVA_HOME" ]; then
123+
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
124+
# IBM's JDK on AIX uses strange locations for the executables
125+
JAVACMD="$JAVA_HOME/jre/sh/java"
126+
else
127+
JAVACMD="$JAVA_HOME/bin/java"
128+
fi
129+
else
130+
JAVACMD="$(
131+
\unset -f command 2>/dev/null
132+
\command -v java
133+
)"
134+
fi
135+
fi
136+
137+
if [ ! -x "$JAVACMD" ]; then
138+
echo "Error: JAVA_HOME is not defined correctly." >&2
139+
echo " We cannot execute $JAVACMD" >&2
140+
exit 1
141+
fi
142+
143+
if [ -z "$JAVA_HOME" ]; then
144+
echo "Warning: JAVA_HOME environment variable is not set." >&2
145+
fi
146+
147+
# traverses directory structure from process work directory to filesystem root
148+
# first directory with .mvn subdirectory is considered project base directory
149+
find_maven_basedir() {
150+
if [ -z "$1" ]; then
151+
echo "Path not specified to find_maven_basedir" >&2
152+
return 1
153+
fi
154+
155+
basedir="$1"
156+
wdir="$1"
157+
while [ "$wdir" != '/' ]; do
158+
if [ -d "$wdir"/.mvn ]; then
159+
basedir=$wdir
160+
break
161+
fi
162+
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
163+
if [ -d "${wdir}" ]; then
164+
wdir=$(
165+
cd "$wdir/.." || exit 1
166+
pwd
167+
)
168+
fi
169+
# end of workaround
170+
done
171+
printf '%s' "$(
172+
cd "$basedir" || exit 1
173+
pwd
174+
)"
175+
}
176+
177+
# concatenates all lines of a file
178+
concat_lines() {
179+
if [ -f "$1" ]; then
180+
# Remove \r in case we run on Windows within Git Bash
181+
# and check out the repository with auto CRLF management
182+
# enabled. Otherwise, we may read lines that are delimited with
183+
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
184+
# splitting rules.
185+
tr -s '\r\n' ' ' <"$1"
186+
fi
187+
}
188+
189+
log() {
190+
if [ "$MVNW_VERBOSE" = true ]; then
191+
printf '%s\n' "$1"
192+
fi
193+
}
194+
195+
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
196+
if [ -z "$BASE_DIR" ]; then
197+
exit 1
198+
fi
199+
200+
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
201+
export MAVEN_PROJECTBASEDIR
202+
log "$MAVEN_PROJECTBASEDIR"
203+
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+
212+
##########################################################################################
213+
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
214+
# This allows using the maven wrapper in projects that prohibit checking in binary data.
215+
##########################################################################################
216+
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
217+
if [ -r "$wrapperJarPath" ]; then
218+
log "Found $wrapperJarPath"
219+
else
220+
log "Couldn't find $wrapperJarPath, downloading it ..."
221+
222+
if [ -n "$MVNW_REPOURL" ]; then
223+
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar"
224+
else
225+
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.3/maven-wrapper-3.3.3.jar"
226+
fi
227+
while IFS="=" read -r key value; do
228+
case "$key" in wrapperUrl)
229+
wrapperUrl=$(trim "${value-}")
230+
break
231+
;;
232+
esac
233+
done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
234+
log "Downloading from: $wrapperUrl"
235+
236+
if $cygwin; then
237+
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
238+
fi
239+
240+
if command -v wget >/dev/null; then
241+
log "Found wget ... using wget"
242+
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
243+
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
244+
wget ${QUIET:+"$QUIET"} "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
245+
else
246+
wget ${QUIET:+"$QUIET"} --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
247+
fi
248+
elif command -v curl >/dev/null; then
249+
log "Found curl ... using curl"
250+
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
251+
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
252+
curl ${QUIET:+"$QUIET"} -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
253+
else
254+
curl ${QUIET:+"$QUIET"} --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
255+
fi
256+
else
257+
log "Falling back to using Java to download"
258+
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
259+
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
260+
# For Cygwin, switch paths to Windows format before running javac
261+
if $cygwin; then
262+
javaSource=$(cygpath --path --windows "$javaSource")
263+
javaClass=$(cygpath --path --windows "$javaClass")
264+
fi
265+
if [ -e "$javaSource" ]; then
266+
if [ ! -e "$javaClass" ]; then
267+
log " - Compiling MavenWrapperDownloader.java ..."
268+
("$JAVA_HOME/bin/javac" "$javaSource")
269+
fi
270+
if [ -e "$javaClass" ]; then
271+
log " - Running MavenWrapperDownloader.java ..."
272+
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
273+
fi
274+
fi
275+
fi
276+
fi
277+
##########################################################################################
278+
# End of extension
279+
##########################################################################################
280+
281+
# If specified, validate the SHA-256 sum of the Maven wrapper jar file
282+
wrapperSha256Sum=""
283+
while IFS="=" read -r key value; do
284+
case "$key" in wrapperSha256Sum)
285+
wrapperSha256Sum=$(trim "${value-}")
286+
break
287+
;;
288+
esac
289+
done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
290+
if [ -n "$wrapperSha256Sum" ]; then
291+
wrapperSha256Result=false
292+
if command -v sha256sum >/dev/null; then
293+
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c - >/dev/null 2>&1; then
294+
wrapperSha256Result=true
295+
fi
296+
elif command -v shasum >/dev/null; then
297+
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c >/dev/null 2>&1; then
298+
wrapperSha256Result=true
299+
fi
300+
else
301+
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
302+
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." >&2
303+
exit 1
304+
fi
305+
if [ $wrapperSha256Result = false ]; then
306+
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
307+
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
308+
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
309+
exit 1
310+
fi
311+
fi
312+
313+
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
314+
315+
# For Cygwin, switch paths to Windows format before running java
316+
if $cygwin; then
317+
[ -n "$JAVA_HOME" ] \
318+
&& JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
319+
[ -n "$CLASSPATH" ] \
320+
&& CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
321+
[ -n "$MAVEN_PROJECTBASEDIR" ] \
322+
&& MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
323+
fi
324+
325+
# Provide a "standardized" way to retrieve the CLI args that will
326+
# work with both Windows and non-Windows executions.
327+
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
328+
export MAVEN_CMD_LINE_ARGS
329+
330+
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
331+
332+
# shellcheck disable=SC2086 # safe args
333+
exec "$JAVACMD" \
334+
$MAVEN_OPTS \
335+
$MAVEN_DEBUG_OPTS \
336+
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
337+
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
338+
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

0 commit comments

Comments
 (0)