theo, can you please send me the --stacktrace output when proxy authentication fails? (use the wrong password) You can use ‘–refresh dependencies’ to force the dependencies to be resolved again.
PS D:\workspace\brem> gradle build -stacktrace
:brem-deploy:compileJava UP-TO-DATE
:helloworld:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':helloworld:compile'.
Cause: Could not resolve group:javax.servlet, module:servlet-api, version:2.4.
Required by:
nl.apg:helloworld:0.0.2-SNAPSHOT
Cause: Could not GET 'http://repo1.maven.org/maven2/javax/servlet/servlet-api/2.4/servlet-api-2.4.pom'. Received status
code 407 from server: Proxy Authentication Required
Cause: Could not resolve group:com.oracle, module:ojdbc14, version:10.2.0.4.0.
Required by:
nl.apg:helloworld:0.0.2-SNAPSHOT
Cause: Could not GET 'http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.4.0/ojdbc14-10.2.0.4.0.pom'. Received stat
us code 407 from server: Proxy Authentication Required
* Try:
Run with --info or --debug option to get more log output.
with some further into the stacktraces:
Caused by: org.gradle.api.UncheckedIOException: Could not GET 'http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.4
.0/ojdbc14-10.2.0.4.0.pom'. Received status code 407 from server: Proxy Authentication Required
at org.gradle.api.internal.artifacts.repositories.transport.http.HttpResourceCollection.processHttpRequest(HttpR
esourceCollection.java:146)
at org.gradle.api.internal.artifacts.repositories.transport.http.HttpResourceCollection.initGet(HttpResourceColl
ection.java:122)
Thanks. Looks like the server just re-sends a 407 in the case of incorrect authentication parameters. So it could be that lima is seeing an authentication failure, since it’s the same exception message.
We hade a change of proxy server recently. I just found out that now I don’t have to provide systemProp.http.proxyUser and systemProp.http.proxyPassword anymore to build with milestone-3. With the latest nightly build I get the same 407 error from the proxy server whether those parameters are specified in the gradle.properties file or not.
No. And I don’t think it’s the credentials because they work in other applications. I was told that our proxy might have a problem with NTLM and that basic authentication might work.
I just talked to a colleague in networking and was corrected.
NTLM should work for our proxy. A tool using NTLM should be able to get the credentials from the windows system the user is logged into. So it shouldn’t be necessary to specify the credentials explicitly in the tool’s config files.
I repeated the test with the debug option. The correct credentials can be seen in the debug output. However, we looked into network communication to the proxy, and the credentials never reached the proxy.
It would be great to have a few more people try out the NTLM support. Here’s some basic instructions to try it out:
Download the latest nightly (bin + documentation) and extract 2) cd /samples/java/quickstart 3) Try “…/…/…/bin/gradle -g home classes”: If you access the network via a proxy this should fail. 4) Create a new file: /samples/java/quickstart/gradle.properties, with the following content
Try again: “…/…/…/bin/gradle -g home classes”. If you get BUILD SUCCESSFUL, great! Otherwise: 6) Try: “…/…/…/bin/gradle --debug --stacktrace -g home classes”, and send me the output. (darrell.deboer@gradleware.com or post a link to the output here)
D:\gradle\nightly-build\gradle-1.4-20121108020615+0000\samples\java\quickstart>g radle build :compileJava NEGOTIATE authentication error: Invalid name provided (Mechanism level: Could no t load configuration file C:\WINDOWS\krb5.ini (The system cannot find the file s pecified))
FAILURE: Build failed with an exception.
What went wrong: Could not resolve all dependencies for configuration ‘:compile’. > Could not resolve group:commons-collections, module:commons-collections, versi on:3.2.
Can you double-check that you have configured the proxy correctly, and that you get the same error with the latest released version (1.2)? It may well be that there are still proxies that the Apache HttpComponents or CIFS library cannot handle.
Gradle build time: Thursday, 8 November 2012 02:06:15 o’clock UTC Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.4 compiled on May 22 2012 Ivy: 2.2.0 JVM: 1.6.0_21 (Sun Microsystems Inc. 17.0-b17) OS: Windows XP 5.1 x86
If need be I can send you the complete log after removing the security details