Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-40515: [Java] Bump org.apache.maven dependencies from 3.3.9 to 3.8.7 #40514

Merged
merged 23 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ JDK=8
KARTOTHEK=latest
# LLVM 12 and GCC 11 reports -Wmismatched-new-delete.
LLVM=14
MAVEN=3.6.3
MAVEN=3.8.7
NODE=18
NUMBA=latest
NUMPY=latest
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-integration.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARG arch=amd64
FROM ${repo}:${arch}-conda-cpp

ARG arch=amd64
ARG maven=3.5
ARG maven=3.8.7
ARG node=16
ARG yarn=1.22
ARG jdk=8
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-hdfs.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARG python=3.8
FROM ${repo}:${arch}-conda-python-${python}

ARG jdk=8
ARG maven=3.5
ARG maven=3.8.7
RUN mamba install -q -y \
maven=${maven} \
openjdk=${jdk} \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-jpype.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARG python=3.8
FROM ${repo}:${arch}-conda-python-${python}

ARG jdk=11
ARG maven=3.6
ARG maven=3.8.7
RUN mamba install -q -y \
maven=${maven} \
openjdk=${jdk} \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-spark.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARG python=3.8
FROM ${repo}:${arch}-conda-python-${python}

ARG jdk=8
ARG maven=3.5
ARG maven=3.8.7

ARG numpy=latest
COPY ci/scripts/install_numpy.sh /arrow/ci/scripts/
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/linux-apt-docs.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ RUN apt-get update -y && \

ENV JAVA_HOME=/usr/lib/jvm/java-${jdk}-openjdk-amd64

ARG maven=3.6.3
ARG maven=3.8.7
COPY ci/scripts/util_download_apache.sh /arrow/ci/scripts/
RUN /arrow/ci/scripts/util_download_apache.sh \
"maven/maven-3/${maven}/binaries/apache-maven-${maven}-bin.tar.gz" /opt
Expand Down
45 changes: 43 additions & 2 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

# Requirements
# - Ruby >= 2.3
# - Maven >= 3.3.9
# - JDK >=7
# - Maven >= 3.8.7
# - JDK >=8
# - gcc >= 4.8
# - Node.js >= 18
# - Go >= 1.19
Expand Down Expand Up @@ -499,6 +499,44 @@ 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
# Append pipe character to make preview release versions like "X.Y.Z-beta-1" sort
# as older than their corresponding release version "X.Y.Z". This works because
# `sort -V` orders the pipe character lower than any version number character.
older_version=$(printf '%s\n%s\n' "$SYSTEM_MAVEN_VERSION" "$MAVEN_VERSION" | sed 's/$/|/' | sort -V | sed 's/|$//' | head -n1)
ianmcook marked this conversation as resolved.
Show resolved Hide resolved
if [[ "$older_version" == "$SYSTEM_MAVEN_VERSION" ]]; 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 | head -n 1 | awk '{print $3}')"
else
show_info "System Maven version ${SYSTEM_MAVEN_VERSION} is newer than minimum version ${MAVEN_VERSION}. Skipping installation."
fi
fi
}

maybe_setup_maven() {
show_info "Ensuring that Maven is installed..."
if [ "${USE_CONDA}" -eq 0 ]; then
install_maven
fi
}

maybe_setup_virtualenv() {
# Optionally setup pip virtualenv with the passed dependencies
local env="venv-${VENV_ENV:-source}"
Expand Down Expand Up @@ -565,6 +603,7 @@ maybe_setup_nodejs() {
test_package_java() {
show_header "Build and test Java libraries"

maybe_setup_maven
maybe_setup_conda maven openjdk

pushd java
Expand Down Expand Up @@ -1202,6 +1241,8 @@ test_wheels() {

test_jars() {
show_header "Testing Java JNI jars"

maybe_setup_maven
ianmcook marked this conversation as resolved.
Show resolved Hide resolved
maybe_setup_conda maven python

local download_dir=${ARROW_TMPDIR}/jars
Expand Down
2 changes: 1 addition & 1 deletion java/maven/module-info-compiler-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</prerequisites>

<properties>
<maven.version>3.3.9</maven.version>
<maven.version>3.8.7</maven.version>
</properties>

<dependencies>
Expand Down
Loading