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.
I originally posted this in STS, but they've said to go back to you guys.
Any idea why this takes so long in eclipse?
Can I turn something on to debug while the build is taking place?
Any ideas or help would be appreciated.
Help get this topic noticed by sharing it on Twitter, Facebook, or email.
Wow, that a long time to wait! There are a few things you can try to help us track down what's going on:
See how long it takes to build the eclipse model in Gradle:
* add `apply plugin: 'eclipse'` to your project (if not already there)
* Execute `gradle eclipse` from the command line, and see how long it takes.
Run the build with `--info` or `--debug`:
* If the `gradle eclipse` command takes a long time, see what's being logged with `gradle --info eclipse`.
* If not, see what's taking so long by getting STS to run Gradle with extra logging: http://forum.springsource.org/showthr...
In either case, use a pastebin service to share the log output.
Any more details you can share about your actual build may help as well.
Running gradle eclipse on the commandline ran in a couple of seconds.
I added -debug to the program arguments under the preferences.
The output from 2 jar files being downloaded from the ivy repository can be found at
It looks as if it takes 1/2 hour for each file to download!
My gradle.properties has the following
In Eclipse Window->Preferences->Gradle->Arguments
Under the JVM Arguments
Use is selected with the following set
It is missing the http.auth.preference and the http.auth.ntlm.domain
So the following HTTP request is timing out after 30 minutes.
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
the 2nd from running eclipse->Gradle->RefreshAll
Can you tell me where it's reading the settings for in the eclipse build?
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.
Thanks for your help.