Forum issue: https://discuss.gradle.org/t/gradle-2-12-stalls-forever-trying-to-resolve-dependencies-if-anything-had-to-be-fetched-via-http/16448
It looks like Gradle doesn't properly use Apache HttpClient 4.3+ API that introduced CloseableHttpResponse.
It's recommended to use org.apache.http.client.utils.HttpClientUtils.closeQuietly(CloseableHttpResponse) in a try-finally clause to make sure the resources aren't leaked. HttpClientUtils.closeQuietly replaces the usage of EntityUtils.consume as well.
The Apache HttpClient quickstart states it clearly: the user MUST call CloseableHttpResponse#close() from a finally clause.
|