I’m using Eclipse Juno with gradle1.4 set in the preferences and an ivy repository. I have proxy settings in a gradle.properties file. The project builds successfully on the command line in a couple of seconds. The project is basic, it doesn’t contain sub-projects but it takes over 20 hours to populate the model & build. There are 40 dependent libraries, but I have transitive set to false for each and I have a fixed version specified for each jar. I’m just converting the projects to gradle from ant, so don’t want to remove jar files already included in the project.
It looks as if it takes 1/2 hour for each file to download!
My gradle.properties has the following org.gradle.java.home=D:/java/jdk/jdk1.6.0_02 systemProp.http.proxyHost=intproxrr.sliderc.nsw.gov.au systemProp.http.proxyPort=8080 systemProp.http.proxyUser=NSWPS/999999 systemProp.http.proxyPassword=xxxxxxxx systemProp.http.auth.preference=Basic systemProp.http.auth.ntlm.domain=NSWPS
Since the request fails, Gradle doesn’t cache this result, and tries again the next time you run the build. (Repository errors like this are treated as transient).
So that explains what’s going wrong. But I don’t understand why this doesn’t affect you when running Gradle from the command-line. A few things to might help:
The output of ‘gradle --debug eclipse’. Only the output as far as resolving the hibernate-annotations sources jar is necessary. - The output of ‘gradle --debug --refresh-dependencies eclipse’, as above.
I’ve managed to figure out what the problem is but not why it’s happening. The dependencies aren’t resolved when the proxy server is being used. So when I tried to build from the command line it FAILED!
When I removed the proxy settings from the command line everything worked!
But getting back to eclipse… it’s still fails despite not having proxy settings set! I’ve cleaned/deleted everything I could think off gradle.properties files, .metadata directory, .gradle directories, deleted the cache, remove all JVM arguments under Windows->Preferences->Gradle. Checked my environment system path, proxy settings aren’t set anywhere.
Yet when I run Gradle->RefreshAll in eclipse. It finds & sets the proxy settings which is why it is failing.
Both of the following builds were done without the gradle.properties, so no proxy settings I’ve attached 2 log files,
the 1st is from running gradle -debug -eclipse on the command line
So somehow your proxy system properties are being set when executing Gradle through eclipse.
13:45:29.063 [DEBUG] [org.gradle.api.internal.externalresource.transport.http.JavaSystemPropertiesHttpProxySettings] Found java system property ‘http.nonProxyHosts’: *.sliderc.nsw.gov.au|localhost|127.0.0.1. Will ignore proxy settings for these hosts.
Looks like you’ve eliminated all of the locations that Gradle might find these values directly, so my suspicion is that Eclipse is finding these properties somewhere, and passing them to Gradle.
Sorry to handball this, but the best place to find out where these values are coming from is probably the STS team. Perhaps you can go back to your original enquiry?
Please keep us informed about what you find out. Sorry I can’t be of more assistance.
In Eclipse, under Window->Preferences->General->Network Connections
If you have the Active Provider set to Manual with the proxy settings listed then these are somehow passed to Gradle. If you change the Active Provider to Direct it works as expected in eclipse.