kou commented on code in PR #40514:
URL: https://github.com/apache/arrow/pull/40514#discussion_r1534715929


##########
dev/release/verify-release-candidate.sh:
##########
@@ -499,6 +499,41 @@ maybe_setup_conda() {
   fi
 }
 
+install_maven() {
+  MAVEN_VERSION=3.8.7
+  if command -v mvn > /dev/null; then
+    SYSTEM_MAVEN_VERSION=$(mvn -v | head -n 1 | awk '{print $3}')
+    show_info "Found Maven version ${SYSTEM_MAVEN_VERSION} at $(command -v 
mvn)."
+  else
+    SYSTEM_MAVEN_VERSION=0.0.0
+    show_info "Maven installation not found."
+  fi
+
+  if [[ "$MAVEN_VERSION" == "$SYSTEM_MAVEN_VERSION" ]]; then
+    show_info "System Maven version ${SYSTEM_MAVEN_VERSION} matches required 
Maven version ${MAVEN_VERSION}. Skipping installation."
+  else
+    older_version=$(printf '%s\n%s\n' "$SYSTEM_MAVEN_VERSION" "$MAVEN_VERSION" 
| sed 's/$/|/' | sort -V | sed 's/|$//' | head -n1)

Review Comment:
   Yes. Thanks.
   
   BTW, we will never specify unreleased version to `MAVEN_VERSION` (required 
minimal Maven version). So the situation will never happen. For example, Maven 
4.0.0 is an unreleased version now ( https://maven.apache.org/docs/history.html 
). We should not use 4.0.0 for `MAVEN_VERSION` because it requires unreleased 
(not the "official") Maven for verifiers.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to