Build sometimes hangs on when downloading artifacts from remote Maven repo


Our project has many dependencies which are downloaded from several remote and in-house Maven repos.

I often have Gradle build hanging supposedly because of remote Maven repo non-responsiveness. I run the build on MaxOS X and Java 7 with --parallel flag (but I am not sure if parallel causes this problem).

My main question: Does Gradle use SO TIMEOUT when downloading dependencies? I know that by default Socket.getSoTimeout() is 0 (meaning infinity) in Java. Is there a way to configure SO TIMEOUT in Gradle?

Thread dump is available at

Looking at HttpClientConfigurer it doesn’t look like we are setting a socket timeout at the moment. Would you be interested in contributing a pull request for this? The change should be fairly trivial. We might want to provide a CONNECTION_TIMEOUT as well while we are at it.

Thanks. I will give it a try in a few days