2424
2525set -euo pipefail
2626
27+ : ${JDK:= 21}
28+ : ${MAVEN:= 3.9.10}
29+
2730main () {
2831 local -r source_dir=" ${1} "
2932
3033 # Install all the dependencies we need for all the subprojects
34+ echo " JDK=${JDK} "
35+ echo " MAVEN=${MAVEN} "
3136
3237 # When installing tzdata, don't block and wait for user input
3338 export DEBIAN_FRONTEND=noninteractive
3439 export TZ=Etc/UTC
3540
41+ echo " ::group::Install APT dependencies"
3642 apt update
3743 apt install -y \
3844 apt-transport-https \
@@ -62,31 +68,46 @@ main() {
6268 ruby-full \
6369 software-properties-common \
6470 wget
71+ echo " ::endgroup::"
6572
66- # Install Java
67-
73+ echo " ::group::Install Java"
74+ echo " ============================================================"
75+ echo " Installing Java ${JDK} ..."
76+ echo " ============================================================"
6877 wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | \
6978 gpg --dearmor | \
7079 tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
7180
7281 echo " deb https://packages.adoptium.net/artifactory/deb $( awk -F= ' /^VERSION_CODENAME/{print$2}' /etc/os-release) main" | \
7382 tee /etc/apt/sources.list.d/adoptium.list
7483
75- # Install Arrow GLib
84+ apt update
85+ apt install -y temurin-${JDK} -jdk
86+ echo " ::endgroup::"
87+
88+ echo " ::group::Install Arrow GLib"
89+ echo " ============================================================"
90+ echo " Installing Arrow GLib..."
91+ echo " ============================================================"
7692 wget https://packages.apache.org/artifactory/arrow/$( lsb_release --id --short | tr ' A-Z' ' a-z' ) /apache-arrow-apt-source-latest-$( lsb_release --codename --short) .deb
7793 apt install -y -V ./apache-arrow-apt-source-latest-$( lsb_release --codename --short) .deb
7894
7995 apt update
8096 apt install -y \
8197 libarrow-dev \
82- libarrow-glib-dev \
83- temurin-21-jdk
98+ libarrow-glib-dev
99+ echo " ::endgroup:: "
84100
85101 # Install Maven
86- wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
102+ echo " ::group::Install Maven"
103+ echo " ============================================================"
104+ echo " Installing Maven ${MAVEN} ..."
105+ echo " ============================================================"
106+ wget -O apache-maven.tar.gz https://dlcdn.apache.org/maven/maven-3/${MAVEN} /binaries/apache-maven-${MAVEN} -bin.tar.gz
87107 mkdir -p /opt/maven
88- tar -C /opt/maven -xzvf apache-maven-3.9.9-bin .tar.gz --strip-components=1
108+ tar -C /opt/maven -xzvf apache-maven.tar.gz --strip-components=1
89109 export PATH=/opt/maven/bin:$PATH
110+ echo " ::endgroup::"
90111
91112 # Check if protoc is too old (Ubuntu 22.04). If so, install it from
92113 # upstream instead.
@@ -95,17 +116,24 @@ main() {
95116 sort --version-sort | \
96117 head -n1 | \
97118 grep -E ' ^3\.15.*$' > /dev/null ; then
119+ echo " ::group::Install protoc"
120+ echo " ============================================================"
121+ echo " Installing protoc..."
122+ echo " ============================================================"
98123 echo " protoc is too old"
99124
100125 wget -O protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-linux-x86_64.zip
101126 unzip -o protoc.zip -d /usr/local -x readme.txt
127+ echo " ::endgroup::"
102128 fi
103129
104130 # We run under Docker and this is necessary since the source dir is
105131 # typically mounted as a volume
106132 git config --global --add safe.directory " ${source_dir} "
107133
134+ echo " ::group::Verify"
108135 " ${source_dir} /dev/release/verify-release-candidate.sh"
136+ echo " ::endgroup::"
109137}
110138
111139main " $@ "
0 commit comments