Skip to content

Commit 45381c9

Browse files
committed
Update maven-wrapper to 3.3.2
1 parent 5afdfce commit 45381c9

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.mvn/wrapper/maven-wrapper.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
wrapperVersion=3.3.1
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
1819
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip

mvnw

+13-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# ----------------------------------------------------------------------------
2020

2121
# ----------------------------------------------------------------------------
22-
# Apache Maven Wrapper startup batch script, version 3.3.1
22+
# Apache Maven Wrapper startup batch script, version 3.3.2
2323
#
2424
# Optional ENV vars
2525
# -----------------
@@ -97,11 +97,19 @@ die() {
9797
exit 1
9898
}
9999

100+
trim() {
101+
# MWRAPPER-139:
102+
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
103+
# Needed for removing poorly interpreted newline sequences when running in more
104+
# exotic environments such as mingw bash on Windows.
105+
printf "%s" "${1}" | tr -d '[:space:]'
106+
}
107+
100108
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
101109
while IFS="=" read -r key value; do
102110
case "${key-}" in
103-
distributionUrl) distributionUrl="${value-}" ;;
104-
distributionSha256Sum) distributionSha256Sum="${value-}" ;;
111+
distributionUrl) distributionUrl=$(trim "${value-}") ;;
112+
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
105113
esac
106114
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
107115
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
@@ -131,7 +139,8 @@ esac
131139
distributionUrlName="${distributionUrl##*/}"
132140
distributionUrlNameMain="${distributionUrlName%.*}"
133141
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
134-
MAVEN_HOME="$HOME/.m2/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
142+
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
143+
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
135144

136145
exec_maven() {
137146
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,7 @@
22882288
<plugin>
22892289
<groupId>org.apache.maven.plugins</groupId>
22902290
<artifactId>maven-wrapper-plugin</artifactId>
2291-
<version>3.3.1</version>
2291+
<version>3.3.2</version>
22922292
</plugin>
22932293

22942294
<plugin>

0 commit comments

Comments
 (0)