kou commented on code in PR #40514:
URL: https://github.com/apache/arrow/pull/40514#discussion_r1533139804
##########
dev/release/verify-release-candidate.sh:
##########
@@ -566,6 +582,7 @@ test_package_java() {
show_header "Build and test Java libraries"
maybe_setup_conda maven openjdk
+ maybe_setup_maven
Review Comment:
Could you use `maybe_setup_maven` -> `maybe_setup_conda` order like others?
```suggestion
maybe_setup_maven
maybe_setup_conda maven openjdk
```
##########
dev/release/verify-release-candidate.sh:
##########
@@ -468,6 +468,22 @@ install_conda() {
conda activate base
}
+maybe_setup_maven() {
Review Comment:
Could you split `maybe_setup_maven` and `install_maven` like
`maybe_setup_nodejs` and `install_nodejs`?
Could you also show `Ensuring ...` message like `maybe_setup_nodejs`?
Could you also check `USE_CONDA` like `maybe_setup_nodejs`?
##########
dev/release/verify-release-candidate.sh:
##########
@@ -468,6 +468,22 @@ install_conda() {
conda activate base
}
+maybe_setup_maven() {
+ MAVEN_VERSION=3.8.7
+ SYSTEM_MAVEN_VERSION=$(mvn -v | head -n 1 | awk '{print $3}')
+ if [[ $(echo "$SYSTEM_MAVEN_VERSION $MAVEN_VERSION" | awk '{print ($1 <
$2)}') -eq 1 ]]; then
Review Comment:
How about using `sort --version-sort`?
```bash
older_version=$((echo $SYSTEM_MAVEN_VERSION; echo $MAVEN_VERSION) | sort
--version-sort | head -n1)
if [[ "$older_version" = "$SYSTEM_MAVEN_VERSION" ]]; then
```
##########
dev/release/verify-release-candidate.sh:
##########
@@ -468,6 +468,22 @@ install_conda() {
conda activate base
}
+maybe_setup_maven() {
+ MAVEN_VERSION=3.8.7
+ SYSTEM_MAVEN_VERSION=$(mvn -v | head -n 1 | awk '{print $3}')
+ if [[ $(echo "$SYSTEM_MAVEN_VERSION $MAVEN_VERSION" | awk '{print ($1 <
$2)}') -eq 1 ]]; then
+ show_info "Installing Maven version ${MAVEN_VERSION}..."
+
APACHE_MIRROR="https://www.apache.org/dyn/closer.lua?action=download&filename="
+ curl -sL -o apache-maven-${MAVEN_VERSION}-bin.tar.gz \
+
${APACHE_MIRROR}/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz
+ tar xzf apache-maven-${MAVEN_VERSION}-bin.tar.gz
+ export PATH=$(pwd)/apache-maven-${MAVEN_VERSION}/bin:$PATH
+ show_info "Installed Maven version $(mvn -v)"
+ else
+ show_info "System Maven version is equal or newer than ${MAVEN_VERSION}.
Skipping installation."
Review Comment:
Could you also show system Maven version?
--
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]