From a4acd9371e9481b0299ec38afca6c00bf9a0ec4d Mon Sep 17 00:00:00 2001 From: Lars Francke Date: Tue, 17 Sep 2024 22:39:00 +0200 Subject: [PATCH] Attempt to improve random connection errors in CI This adds a Maven settings.xml file which contains the necessary settings to lower the TTL for connections in the connection pool used by Maven to download artifacts. This is to work around an issue where Azure would silently terminate connections that have been idle for more than 4 minutes causing weird aborts in GitHub --- java-devel/Dockerfile | 2 ++ java-devel/stackable/settings.xml | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 java-devel/stackable/settings.xml diff --git a/java-devel/Dockerfile b/java-devel/Dockerfile index 9b3a0e365..d4238870c 100644 --- a/java-devel/Dockerfile +++ b/java-devel/Dockerfile @@ -47,6 +47,8 @@ RUN microdnf update && \ ENV JAVA_HOME=/usr/lib/jvm/jre-${PRODUCT} +COPY --chown=stackable:0 java-devel/stackable/settings.xml /stackable/.m2/settings.xml + # Mitigation for CVE-2021-44228 (Log4Shell) # This variable is supported as of Log4j version 2.10 and # disables the vulnerable feature diff --git a/java-devel/stackable/settings.xml b/java-devel/stackable/settings.xml new file mode 100644 index 000000000..cee0ee37f --- /dev/null +++ b/java-devel/stackable/settings.xml @@ -0,0 +1,29 @@ + + + + stackable + + + + + 30 + + + 30 + + + + + + stackable + +