Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions java-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions java-devel/stackable/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<settings>
<profiles>
<profile>
<id>stackable</id>
<properties>
<!--
This is to work around an issue where Maven builds in Github Actions would randomly fail.
There is some evidence that points at Azure networking as the root cause where it closes idle connections (silently) after 4 minutes.
Maven would then sometimes reuse an "old" connection from its connection pool and would encounter issues due to these connection closures.
This patch changes the TTL for the connections to a lower value than 4 minutes (240s), the default is 300s (5min).

There are two properties here because sometimes in November 2023 the name was changed.
The new name will only take effect as of Maven 4, but it doesn't hurt to add it here already, therefore, we just add both properties here.
https://issues.apache.org/jira/browse/MRESOLVER-440
-->

<!-- Old name: maven-resolver 1.x, Maven 3.x -->
<aether.connector.http.connectionMaxTtl>30</aether.connector.http.connectionMaxTtl>

<!-- New name: maven-resolver 2.x, as of Maven 4.x -->
<aether.transport.http.connectionMaxTtl>30</aether.transport.http.connectionMaxTtl>
</properties>
</profile>
</profiles>
<activeProfiles>
<!--make the stackable profile active all the time -->
<activeProfile>stackable</activeProfile>
</activeProfiles>
</settings>