Skip to content

Commit 134e2a2

Browse files
committed
Use custom Maven version for all our products
1 parent f8e41f1 commit 134e2a2

File tree

16 files changed

+40
-70
lines changed

16 files changed

+40
-70
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ All notable changes to this project will be documented in this file.
77
### Changed
88

99
- all: Use our build-repo to cache NPM dependencies ([#1219])
10+
- java: Use a more recent Maven version for all Java based products ([#1220])
1011

1112
[#1219]: https://github.com/stackabletech/docker-images/pull/1219
13+
[#1220]: https://github.com/stackabletech/docker-images/pull/1220
1214

1315
## [25.7.0] - 2025-07-23
1416

druid/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
7373
tar -czf /stackable/druid-${NEW_VERSION}-src.tar.gz .
7474

7575
mvn \
76-
--batch-mode \
77-
--no-transfer-progress \
7876
clean install \
7977
-Pdist,stackable-bundle-contrib-exts \
8078
-Dhadoop.compile.version=${HADOOP_VERSION}-stackable${RELEASE} \

hadoop/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
5252
tar -czf /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz .
5353

5454
mvn \
55-
--batch-mode \
56-
--no-transfer-progress\
5755
clean package \
5856
-P hadoop-${HADOOP_VERSION} \
5957
-Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE} \

hadoop/hadoop/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ tar -czf /stackable/hadoop-${NEW_VERSION}-src.tar.gz .
7676
# Therefore, this build does work but the final image does NOT contain the openssl-devel package which is why it fails there which is why we have to create the symlink over there manually.
7777
# We still leave this flag in to automatically fail should anything with the packages or symlinks ever fail.
7878
mvn \
79-
--batch-mode \
80-
--no-transfer-progress \
8179
clean package install \
8280
-Pdist,native \
8381
-pl '!hadoop-tools/hadoop-pipes' \

hbase/hbase-opa-authorizer/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ if [[ -n "$PRODUCT" ]]; then
2020
# Create snapshot of the source code including custom patches
2121
tar -czf /stackable/hbase-opa-authorizer-${PRODUCT}-src.tar.gz .
2222
mvn \
23-
--batch-mode \
24-
--no-transfer-progress \
2523
-DskipTests \
2624
-Dmaven.test.skip=true \
2725
package

hbase/hbase-operator-tools/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ mvn versions:set -DnewVersion=$NEW_VERSION
5151
tar -czf /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}-src.tar.gz .
5252

5353
mvn \
54-
--batch-mode \
55-
--no-transfer-progress \
5654
-Dhbase.version=${PATCHED_HBASE_VERSION} \
5755
-Dhbase-thirdparty.version=${HBASE_THIRDPARTY} \
5856
-DskipTests \

hbase/hbase/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,12 @@ tar -czf /stackable/hbase-${NEW_VERSION}-src.tar.gz .
5454
# I chose to replicate that exact behavior for consistency so please don't merge the two mvn runs into one unless you really know what you're doing!
5555
# Cannot skip building tests here because the assembly plugin needs a shell script from the test directory.
5656
mvn \
57-
--batch-mode \
58-
--no-transfer-progress \
5957
-Dhadoop.profile=3.0 \
6058
-Dhadoop-three.version=${HADOOP_VERSION}-stackable${RELEASE} \
6159
-DskipTests \
6260
clean install
6361

6462
mvn \
65-
--batch-mode \
66-
--no-transfer-progress \
6763
-Dhadoop.profile=3.0 \
6864
-Dhadoop-three.version=${HADOOP_VERSION}-stackable${RELEASE} \
6965
-DskipTests \

hbase/phoenix/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ tar -czf /stackable/phoenix-${PRODUCT}-stackable${RELEASE}-src.tar.gz .
4747
# The Maven command can be found inside of the scripts in the create-release folder (release-util.sh as of Phoenix 5.2.0)
4848
# https://github.com/apache/phoenix/tree/5.2.0/dev/create-release
4949
mvn \
50-
--batch-mode \
51-
--no-transfer-progress \
5250
-Dhbase.version=${HBASE_VERSION}-stackable${RELEASE} \
5351
-Dhbase.profile=${HBASE_PROFILE} \
5452
-Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE} \

hive/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,19 @@ mvn versions:set -DnewVersion=$NEW_VERSION -DartifactId=* -DgroupId=* -Dgenerate
5656
tar -czf /stackable/hive-${NEW_VERSION}-src.tar.gz .
5757

5858
if [[ "${PRODUCT}" == "3.1.3" ]] ; then
59-
mvn --batch-mode --no-transfer-progress clean package -DskipTests --projects standalone-metastore
59+
mvn \
60+
clean package \
61+
-DskipTests \
62+
--projects standalone-metastore
6063
mv standalone-metastore/target/apache-hive-metastore-${NEW_VERSION}-bin/apache-hive-metastore-${NEW_VERSION}-bin /stackable
6164
mv standalone-metastore/target/bom.json /stackable/apache-hive-metastore-${NEW_VERSION}-bin/apache-hive-metastore-${NEW_VERSION}.cdx.json
6265
else
6366
(
6467
# https://issues.apache.org/jira/browse/HIVE-20451 switched the metastore server packaging starting with 4.0.0
65-
mvn --batch-mode --no-transfer-progress clean package -DskipTests -Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE}
68+
mvn \
69+
clean package \
70+
-DskipTests \
71+
-Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE}
6672

6773
# We only seem to get a .tar.gz archive, so let's extract that to the correct location
6874
tar --extract --directory=/stackable -f standalone-metastore/metastore-server/target/apache-hive-standalone-metastore-server-${NEW_VERSION}-bin.tar.gz

java-devel/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FROM stackable/image/stackable-devel
99

1010
ARG PRODUCT
1111
ARG STACKABLE_USER_UID
12+
ARG MAVEN_VERSION="3.9.10"
1213

1314
# See: https://adoptium.net/en-gb/installation/linux/#_centosrhelfedora_instructions
1415
RUN cat <<EOF > /etc/yum.repos.d/adoptium.repo
@@ -46,7 +47,6 @@ microdnf install \
4647
krb5-devel \
4748
libcurl-devel \
4849
make \
49-
maven \
5050
openssl-devel \
5151
`# Required to unpack Omid tarball` \
5252
tar \
@@ -56,9 +56,15 @@ microdnf install \
5656
zlib-devel
5757
microdnf clean all
5858
rm -rf /var/cache/yum
59+
60+
curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC /tmp
61+
mv /tmp/apache-maven-${MAVEN_VERSION} /opt/maven
62+
ln -s /opt/maven/bin/mvn /usr/bin/mvn
63+
5964
EOF
6065

6166
ENV JAVA_HOME="/usr/lib/jvm/temurin-${PRODUCT}-jdk"
67+
ENV MAVEN_ARGS="--batch-mode --no-transfer-progress"
6268

6369
COPY --chown=${STACKABLE_USER_UID}:0 java-devel/stackable/settings.xml /stackable/.m2/settings.xml
6470
COPY --chown=${STACKABLE_USER_UID}:0 java-devel/stackable/settings.xml /root/.m2/settings.xml

0 commit comments

Comments
 (0)