lhotari opened a new pull request, #19903: URL: https://github.com/apache/pulsar/pull/19903
### Motivation In CI, there are some occurrences of failed maven downloads. [For example](https://github.com/apache/pulsar/actions/runs/4489637889/jobs/7896090250#step:11:74): ``` Error: Failed to execute goal on project pulsar-broker: Could not resolve dependencies for project org.apache.pulsar:pulsar-broker:jar:3.0.0-SNAPSHOT: Could not transfer artifact org.eclipse.jetty:jetty-http:jar:9.4.48.v20220622 from/to central (https://repo1.maven.org/maven2): transfer failed for https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/9.4.48.v20220622/jetty-http-9.4.48.v20220622.jar: Connect to repo1.maven.org:443 [repo1.maven.org/151.101.40.209] failed: Connection timed out -> [Help 1] ``` Retries are enabled, but it turns out that there are additional settings in Maven for configuring retries when a download fails after it has started successfully or when the server returns a 5xx error. ### Modifications Add `-Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.serviceUnavailableRetryStrategy.class=standard` to `MAVEN_OPTS` ### Additional context The CI uses currently Maven 3.8.7 . In Maven 3.9.x, the downloading uses different libraries (maven-resolver instead of maven-wagon, for example see [MNG-7708](https://issues.apache.org/jira/browse/MNG-7708)). The configuration options for Maven 3.9.x will require revisiting once GitHub Actions upgrades to use Maven 3.9.x+ . ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
