From 043860b67d8b3eeac74c00c32216f196372ac75d Mon Sep 17 00:00:00 2001 From: Jason Tieu <6509369+tieujason330@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:18:46 -0700 Subject: [PATCH] Disable http keep-alive to address maven deps 'Connection Reset' errors ### What changes are proposed in this pull request? Disable keep-alive for HTTP requests to deal with connection resets when fetching maven deps from central repo. Unable to repro ([ref](https://stackoverflow.com/questions/55899091/maven-retry-dependency-download-if-failed)) ### Why are the changes needed? Trying to address tarball build failures via CI due to maven errors. ### Does this PR introduce any user facing changes? no pr-link: Alluxio/alluxio#17864 change-id: cid-767a7869d93ca2dbaee4e036d2bd7779ab7618e9 --- dev/scripts/src/alluxio.org/build/cmd/build.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dev/scripts/src/alluxio.org/build/cmd/build.go b/dev/scripts/src/alluxio.org/build/cmd/build.go index ad2566f2e4b7..423481323c61 100644 --- a/dev/scripts/src/alluxio.org/build/cmd/build.go +++ b/dev/scripts/src/alluxio.org/build/cmd/build.go @@ -199,14 +199,15 @@ func buildTarball(opts *buildOpts) error { func constructMavenCmd(mvnArgs []string) string { cmd := []string{ "mvn", - "-am", // "also make": build dependent projects if a project list via `-pl` is specified - "clean", // remove previously generated files - "install", // maven build - "-DskipTests", // skip unit tests - "-Dfindbugs.skip", // skip findbugs static analysis check - "-Dmaven.javadoc.skip", // skip javadoc generation - "-Dcheckstyle.skip", // skip checkstyle static check - "-Prelease", // release profile specified in root pom.xml, to build dependency-reduced-pom.xml generated by shading plugin + "-am", // "also make": build dependent projects if a project list via `-pl` is specified + "clean", // remove previously generated files + "install", // maven build + "-DskipTests", // skip unit tests + "-Dfindbugs.skip", // skip findbugs static analysis check + "-Dmaven.javadoc.skip", // skip javadoc generation + "-Dcheckstyle.skip", // skip checkstyle static check + "-Prelease", // release profile specified in root pom.xml, to build dependency-reduced-pom.xml generated by shading plugin + "-Dhttp.keepAlive=false", // disable keep-alive for HTTP requests to deal with connection resets when fetching maven dependencies } if len(mvnArgs) > 0 { cmd = append(cmd, mvnArgs...)