diff --git a/CHANGELOG.md b/CHANGELOG.md index a62f1889f..f96e2cb8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,10 @@ All notable changes to this project will be documented in this file. ### Changed - all: Use our build-repo to cache NPM dependencies ([#1219]) +- java: Use a more recent Maven version for all Java based products ([#1220]) [#1219]: https://github.com/stackabletech/docker-images/pull/1219 +[#1220]: https://github.com/stackabletech/docker-images/pull/1220 ## [25.7.0] - 2025-07-23 diff --git a/druid/Dockerfile b/druid/Dockerfile index f4caf5645..9eeb3263d 100644 --- a/druid/Dockerfile +++ b/druid/Dockerfile @@ -73,8 +73,6 @@ cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository tar -czf /stackable/druid-${NEW_VERSION}-src.tar.gz . mvn \ - --batch-mode \ - --no-transfer-progress \ clean install \ -Pdist,stackable-bundle-contrib-exts \ -Dhadoop.compile.version=${HADOOP_VERSION}-stackable${RELEASE} \ diff --git a/hadoop/Dockerfile b/hadoop/Dockerfile index 5647d6c57..0d2e447d1 100644 --- a/hadoop/Dockerfile +++ b/hadoop/Dockerfile @@ -52,8 +52,6 @@ cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository tar -czf /stackable/hdfs-utils-${HDFS_UTILS}-src.tar.gz . mvn \ - --batch-mode \ - --no-transfer-progress\ clean package \ -P hadoop-${HADOOP_VERSION} \ -Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE} \ diff --git a/hadoop/hadoop/Dockerfile b/hadoop/hadoop/Dockerfile index 2a90d34e1..342eef556 100644 --- a/hadoop/hadoop/Dockerfile +++ b/hadoop/hadoop/Dockerfile @@ -76,8 +76,6 @@ tar -czf /stackable/hadoop-${NEW_VERSION}-src.tar.gz . # 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. # We still leave this flag in to automatically fail should anything with the packages or symlinks ever fail. mvn \ - --batch-mode \ - --no-transfer-progress \ clean package install \ -Pdist,native \ -pl '!hadoop-tools/hadoop-pipes' \ diff --git a/hbase/hbase-opa-authorizer/Dockerfile b/hbase/hbase-opa-authorizer/Dockerfile index 776f578c8..78f5a7115 100644 --- a/hbase/hbase-opa-authorizer/Dockerfile +++ b/hbase/hbase-opa-authorizer/Dockerfile @@ -20,8 +20,6 @@ if [[ -n "$PRODUCT" ]]; then # Create snapshot of the source code including custom patches tar -czf /stackable/hbase-opa-authorizer-${PRODUCT}-src.tar.gz . mvn \ - --batch-mode \ - --no-transfer-progress \ -DskipTests \ -Dmaven.test.skip=true \ package diff --git a/hbase/hbase-operator-tools/Dockerfile b/hbase/hbase-operator-tools/Dockerfile index 7f5226aeb..26ce48f69 100644 --- a/hbase/hbase-operator-tools/Dockerfile +++ b/hbase/hbase-operator-tools/Dockerfile @@ -51,8 +51,6 @@ mvn versions:set -DnewVersion=$NEW_VERSION tar -czf /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}-src.tar.gz . mvn \ - --batch-mode \ - --no-transfer-progress \ -Dhbase.version=${PATCHED_HBASE_VERSION} \ -Dhbase-thirdparty.version=${HBASE_THIRDPARTY} \ -DskipTests \ diff --git a/hbase/hbase/Dockerfile b/hbase/hbase/Dockerfile index 937b045a2..63dbdef99 100644 --- a/hbase/hbase/Dockerfile +++ b/hbase/hbase/Dockerfile @@ -54,16 +54,12 @@ tar -czf /stackable/hbase-${NEW_VERSION}-src.tar.gz . # 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! # Cannot skip building tests here because the assembly plugin needs a shell script from the test directory. mvn \ - --batch-mode \ - --no-transfer-progress \ -Dhadoop.profile=3.0 \ -Dhadoop-three.version=${HADOOP_VERSION}-stackable${RELEASE} \ -DskipTests \ clean install mvn \ - --batch-mode \ - --no-transfer-progress \ -Dhadoop.profile=3.0 \ -Dhadoop-three.version=${HADOOP_VERSION}-stackable${RELEASE} \ -DskipTests \ diff --git a/hbase/phoenix/Dockerfile b/hbase/phoenix/Dockerfile index 9205a76c4..4cad25c75 100644 --- a/hbase/phoenix/Dockerfile +++ b/hbase/phoenix/Dockerfile @@ -47,8 +47,6 @@ tar -czf /stackable/phoenix-${PRODUCT}-stackable${RELEASE}-src.tar.gz . # The Maven command can be found inside of the scripts in the create-release folder (release-util.sh as of Phoenix 5.2.0) # https://github.com/apache/phoenix/tree/5.2.0/dev/create-release mvn \ - --batch-mode \ - --no-transfer-progress \ -Dhbase.version=${HBASE_VERSION}-stackable${RELEASE} \ -Dhbase.profile=${HBASE_PROFILE} \ -Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE} \ diff --git a/hive/Dockerfile b/hive/Dockerfile index a49be4556..f182975f0 100644 --- a/hive/Dockerfile +++ b/hive/Dockerfile @@ -56,13 +56,19 @@ mvn versions:set -DnewVersion=$NEW_VERSION -DartifactId=* -DgroupId=* -Dgenerate tar -czf /stackable/hive-${NEW_VERSION}-src.tar.gz . if [[ "${PRODUCT}" == "3.1.3" ]] ; then - mvn --batch-mode --no-transfer-progress clean package -DskipTests --projects standalone-metastore + mvn \ + clean package \ + -DskipTests \ + --projects standalone-metastore mv standalone-metastore/target/apache-hive-metastore-${NEW_VERSION}-bin/apache-hive-metastore-${NEW_VERSION}-bin /stackable mv standalone-metastore/target/bom.json /stackable/apache-hive-metastore-${NEW_VERSION}-bin/apache-hive-metastore-${NEW_VERSION}.cdx.json else ( # https://issues.apache.org/jira/browse/HIVE-20451 switched the metastore server packaging starting with 4.0.0 - mvn --batch-mode --no-transfer-progress clean package -DskipTests -Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE} + mvn \ + clean package \ + -DskipTests \ + -Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE} # We only seem to get a .tar.gz archive, so let's extract that to the correct location tar --extract --directory=/stackable -f standalone-metastore/metastore-server/target/apache-hive-standalone-metastore-server-${NEW_VERSION}-bin.tar.gz diff --git a/java-devel/Dockerfile b/java-devel/Dockerfile index a1e06477a..8a4343aed 100644 --- a/java-devel/Dockerfile +++ b/java-devel/Dockerfile @@ -10,6 +10,10 @@ FROM stackable/image/stackable-devel ARG PRODUCT ARG STACKABLE_USER_UID +# Find the latest version here: https://github.com/apache/maven +# renovate: datasource=github-tags packageName=apache/maven +ARG MAVEN_VERSION="3.9.10" + # See: https://adoptium.net/en-gb/installation/linux/#_centosrhelfedora_instructions RUN cat < /etc/yum.repos.d/adoptium.repo [Adoptium] @@ -46,7 +50,6 @@ microdnf install \ krb5-devel \ libcurl-devel \ make \ - maven \ openssl-devel \ `# Required to unpack Omid tarball` \ tar \ @@ -56,9 +59,15 @@ microdnf install \ zlib-devel microdnf clean all rm -rf /var/cache/yum + +curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC /tmp +mv /tmp/apache-maven-${MAVEN_VERSION} /opt/maven +ln -s /opt/maven/bin/mvn /usr/bin/mvn + EOF ENV JAVA_HOME="/usr/lib/jvm/temurin-${PRODUCT}-jdk" +ENV MAVEN_ARGS="--batch-mode --no-transfer-progress" COPY --chown=${STACKABLE_USER_UID}:0 java-devel/stackable/settings.xml /stackable/.m2/settings.xml COPY --chown=${STACKABLE_USER_UID}:0 java-devel/stackable/settings.xml /root/.m2/settings.xml diff --git a/nifi/Dockerfile b/nifi/Dockerfile index 49e4092b8..d40385498 100644 --- a/nifi/Dockerfile +++ b/nifi/Dockerfile @@ -9,7 +9,6 @@ FROM stackable/image/java-devel AS nifi-builder ARG PRODUCT ARG RELEASE -ARG MAVEN_VERSION="3.9.8" ARG STACKABLE_USER_UID RUN <