Running gradlew (Gradle 1.10) behind NTLM proxy, cannot connect to maven repositories

I see this issue has arisen a couple of times already.

As suggested in some of those discussions, I have a file in my build folder with the proxy settings. I’ve also replaced lib\http-client.jar and lib\http-core.jar with the latest versions from Apache.

If I run gradlew, it correctly downloads the Gradle distribution, which it wouldn’t do until I put a file in the build folder. So the proxy settings appear to be acceptable to Gradle.

The exceptions start when the maven repositories are required. Here’s an example:

Could not resolve org.spockframework:spock-core:0.7-groovy-2.0.

Required by:


Could not GET ‘’.

org.apache.http.client.ClientProtocolException (no error message)

Here’s the wrapper task from build.gradle, FWIW:

task wrapper(type: Wrapper) {

gradleVersion = ‘1.5’ }

Replacing the Http client jars is not something that would be recommended, or supported. Once you have undone that change, please send the full error message reported by running Gradle with ‘–stacktrace’.

HTTP client/core jars have been reverted.

Stacktrace is here:

What properties are you setting in your file? Do you have proxy authentication credentials in there, as described in ?

If so, can you please post the results of running gradle with --debug? (Note this will have a lot of output).

There’s no guarantee I’ll have time to investigate further in the near future, but without more details it’s impossible to help.