Skip to content

Commit

Permalink
Disable http keep-alive to address maven deps 'Connection Reset' errors
Browse files Browse the repository at this point in the history
### 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: #17864
			change-id: cid-767a7869d93ca2dbaee4e036d2bd7779ab7618e9
  • Loading branch information
tieujason330 authored Jul 31, 2023
1 parent 68832e5 commit 043860b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions dev/scripts/src/alluxio.org/build/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit 043860b

Please sign in to comment.