Skip to content

Commit 373a699

Browse files
committed
update build/mvnd
1 parent 7087131 commit 373a699

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

build/mvnd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,8 @@ install_mvn() {
104104
# See simple version normalization: http://stackoverflow.com/questions/16989598/bash-comparing-version-numbers
105105
function version { echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; }
106106

107-
if [ $(version $MVND_DETECTED_VERSION) -ne $(version $MVND_VERSION) ]; then
108-
109-
# if [ $(version $MVN_DETECTED_VERSION) -ne $(version $MVN_VERSION) ]; then
110-
# echo "Mvnd $MVND_DETECTED_VERSION embedded maven version $MVN_DETECTED_VERSION is not equivalent to $MVN_VERSION required in pom."
111-
# exit 1
112-
# fi
107+
if [ $(version $MVND_DETECTED_VERSION) -ne $(version $MVND_VERSION) ]
108+
then
113109
local APACHE_MIRROR=${APACHE_MIRROR:-'https://downloads.apache.org'}
114110
local OS_TYPE=$(get_os_type)
115111
local ARCH=$(get_os_arch)
@@ -120,6 +116,11 @@ install_mvn() {
120116
"maven-mvnd-${MVND_VERSION}-${OS_TYPE}-${ARCH}/bin/mvnd"
121117

122118
MVND_BIN="${_DIR}/maven-mvnd-${MVND_VERSION}-${OS_TYPE}-${ARCH}/bin/mvnd"
119+
else
120+
if [ $(version $MVN_DETECTED_VERSION) -ne $(version $MVN_VERSION) ]; then
121+
echo "Mvnd $MVND_DETECTED_VERSION embedded maven version $MVN_DETECTED_VERSION is not equivalent to $MVN_VERSION required in pom."
122+
exit 1
123+
fi
123124
fi
124125
}
125126

0 commit comments

Comments
 (0)