Hi all,

We recently switched from Maven 3.8.x to 3.9.x and all of a sudden, we ran
into connection timeouts during downloading the maven-jar-plugin after all
tests passed.

After some digging, I suspect that it is a combination of GitHub Actions
running on Azure which silently drops open connections after around four
minutes (see discussion in
https://github.com/actions/runner-images/issues/1499) and the switch to the
native HTTP transport in Maven 3.9.x.
Our tests take quite some time and because the maven-jar-plugin is freshly
downloaded after these, the used connection was opened before the tests
were started and is dropped by Azure meanwhile.

Our current workaround is switching to the old Wagon HTTP provider (with
-Dmaven.resolver.transport=wagon) and setting a TTL for the used HTTP pool
(-Dmaven.wagon.httpconnectionManager.ttlSeconds=180) or disabling the pool
and keep alive (-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false).

Unfortunately, the new HTTP transport does not allow changing the TTL
(which by default is -1 which means forever) or disabling it altogether. It
would be nice if such settings would be added in one of the next releases.

I would be happy to help/try to provide a patch on my own if this helps.

Regards,
Michael

Reply via email to