Skip to content

Commit 5b7f4f0

Browse files
authored
zip4j: Add retry handler setting for maven build (#10429)
The Maven build process requires fetching dependency libraries from the central repository with Apache Wagon. This fetching action will fail because of an unstable connection or connection rest by the repository server because there are too many fetching requests. By default, maven build does not retry the fetching if it is not an error in the request-sending methods. Thus these failing dependency fetching will cause maven project fail to build randomly. This PR fixes the build script to configure the maven wagon parameter to force it to retry when failing and also increases the timeout and retry count to decrease the chance of build failure from dependencies fetching failure cases. Signed-off-by: Arthur Chan <[email protected]>
1 parent bf0e3eb commit 5b7f4f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/zip4j/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
mv $SRC/{*.zip,*.dict} $OUT
1919

2020
MAVEN_ARGS="-Dmaven.test.skip=true -Djavac.src.version=15 -Djavac.target.version=15"
21+
MAVEN_ARGS=$MAVEN_ARGS" -Dmaven.wagon.httpconnectionManager.ttlSeconds=120"
22+
MAVEN_ARGS=$MAVEN_ARGS" -Dmaven.wagon.http.retryHandler.requestSentEnabled=true"
23+
MAVEN_ARGS=$MAVEN_ARGS" -Dmaven.wagon.http.retryHandler.count=5"
2124
$MVN package org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade $MAVEN_ARGS
2225
CURRENT_VERSION=$($MVN org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
2326
-Dexpression=project.version -q -DforceStdout)

0 commit comments

Comments
 (0)