Skip to content

Commit de5c21f

Browse files
authored
fix(java-devel): Apply Maven retry settings under connector.* keys used by Maven 3.9 (#1591)
#1584 added HTTP retry settings (retryHandler.count/interval/intervalMax) under the aether.transport.http.* keys. That prefix is the maven-resolver 2.x / Maven 4 spelling; we build with Maven 3.9.16 (maven-resolver 1.9.27), which only reads aether.connector.http.*, so those settings currently have no effect. Add the connector.* spelling alongside the transport.* one so the retries actually apply today, mirroring how connectionMaxTtl is already dual-spelled. CI Maven failures are connection-level (stale keep-alive connections dropped by the network; no server-side 5xx in Nexus/Apache logs). maven-resolver's retry handler retries these IOExceptions, so this makes the intended retry behaviour effective. Key names verified against ConfigurationProperties.java @ maven-resolver-1.9.27.
1 parent cf384ff commit de5c21f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

java-devel/stackable/settings.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,34 @@
5858
<!-- New name: maven-resolver 2.x, as of Maven 4.x -->
5959
<aether.transport.http.connectionMaxTtl>25</aether.transport.http.connectionMaxTtl>
6060

61+
<!--
62+
As with connectionMaxTtl above, the retry keys were renamed between maven-resolver 1.x
63+
(aether.connector.http.*) and 2.x (aether.transport.http.*).
64+
At the time of writing we were building with a version of Maven that requires the old ("connector") properties.
65+
The "transport" keys are here for Maven 4.
66+
Verified against ConfigurationProperties.java @ maven-resolver-1.9.27.
67+
It does not hurt to keep both sets in here.
68+
-->
69+
6170
<!--
6271
By default, requests are retried 3 times. We increase the count slightly to hopefully get less failing
6372
builds in CI.
6473
-->
74+
<aether.connector.http.retryHandler.count>5</aether.connector.http.retryHandler.count>
6575
<aether.transport.http.retryHandler.count>5</aether.transport.http.retryHandler.count>
6676

6777
<!--
6878
By default, retries wait for 5000 milliseconds (5 seconds). We increase this to 10000 milliseconds
6979
(10 seconds) to spam the Nexus instance a little less.
7080
-->
81+
<aether.connector.http.retryHandler.interval>10000</aether.connector.http.retryHandler.interval>
7182
<aether.transport.http.retryHandler.interval>10000</aether.transport.http.retryHandler.interval>
7283

7384
<!--
7485
Servers can respond with `Retry-After` headers. By default, the value is capped at 300000 milliseconds (300
7586
seconds). We reduce this to 60000 (60 seconds) to avoid super long retry intervals.
7687
-->
88+
<aether.connector.http.retryHandler.intervalMax>60000</aether.connector.http.retryHandler.intervalMax>
7789
<aether.transport.http.retryHandler.intervalMax>60000</aether.transport.http.retryHandler.intervalMax>
7890

7991
<!--

0 commit comments

Comments
 (0)