Gradle Wrapper is unusable from Eclipse #28
Comments
You will need to provide more details. I have no idea what your problem is. Describe precisely what it is you are trying to do, and what goes wrong. I will say however that the tooling don't run gradle by executing a shell process like './gradlew ...'. It uses the gradle tooling API. The tooling API will not use the wrapper but it will read the wrapper.properties file and obey it. That is, unless you do something non-standard to your project, like editing the wrapper script and move the wrapper files to a non-standard location. In that case gradle tooling api will not be able to find the wrapper properties and not obey them. Since your description of the problem is a little vague, I really don't know if this information is relevant to your issue, but its the best I can do. If you have a problem with a specific project, it would help to include a sample project (cut down version of your project that still demonstrates the issue). I can then try to reproduce and diagnose the problem. |
Hmm... I've tried that in STS 3.5.0 with Groovy Eclipse and Gradle Eclipse Integration from this update site: http://dist.springsource.com/release/TOOLS/update/e4.3/ Platform is Mac OSX. Probably some corner case scenario... Will try Win7 and plain eclipse + Greclipse and Gradle Eclipse integration. BTW, is that your initial setup? Eclipse for JEE dev + Groovy Eclipse + Gradle Eclipse Integration? |
Just to clarify something that is probably not obvious. THe "Convert To Gradle Project" doesn't really convert Java projects to Gradle projects. All it does is enable the Gradle tooling on a project by adding "Gradle Nature". If you wanted to create a simple Java gradle project you would be better to use 'New Gradle Project' and choose the 'Java Quickstart' sample. If you have an existing gradle project and want to get it inside of Eclipse. Then you should import it with Gradle Import Wizard. You should rarely have to use the 'Convert to Gradle Project' menu. The hanging thing, of course, is an issue regardless. |
Do you have any Firewall or Network proxy in your network environment? It is possible this is actually causing the hang. It could be interferring with either Gradle tooling connecting locally to the Gradle daemon or the gradle daemon connecting to the internet. Either one of these could cause the process to hang. |
To diagnose the hang it is useful to collect a stacktrace. 'jps' and 'jstack' are commandline tools part of the JDK that will allow you to determine the process id of a Java process (jps) and then extract a stackdump (jstack). Can you try to collect a stack dump of the hanging Eclipse instance as well as the Gradle Daemon. |
Possibly related: https://issuetracker.springsource.com/browse/STS-3495 This is not the first and only time I've heard of issues connecting to the daemon on Windows. The problem is usually not a bug in the tooling but something else preventing the connection between eclipse and the daemon. |
Okay... one more idea. When you use 'gradle wrapper default' it will need to download a gradle distribution (the first time a gradle operation is used). Since you say you specifically have problem with that scenario... Maybe the problem is the distribution either can't be downloaded or just takes a very long time because you have a slow internet connection. All of these ideas are only guesses. The stacktraces will help determine what's going on. PS: I just tried the 'convert to Gradle project' and it works for me. I do see a bit of a pause around 25% also, which I think is the 'download gradle step' but I have fast enough internet connection it is only a few seconds. |
It might be that during the conversion of Java project to Gradle project it may ask you to confirm network access permissions on Windows (i got that "allow access" dialog on Win7) where you pick the decision allow access and it succeeds. Perhaps you either don't get this dialog or selected something previously that disallows network access in this case... Just a guess... Otherwise i couldn't reproduce this on Win7. |
Good Morning,
What do you mean with initial setup? I used to work with Eclipse for JEE for years now. Since Spring 4 was released and all those good small tutorials with Gradle came up, I installed Gradle IDE and cause the scripts are groovy I also installed Groovy Eclipse.
I know that. I used to write a small build.gradle and then using the Gralde Import wizard, but the given example shows the problem in the simplest possible scenario.
In the office we have a firewall, but Gradle and Gradle Wrapper is working from the commmand line.
The distribution was downloaded before. In addition my Internet connection speed is always more then 25 MBit/s.
And have the wrapper initialized by command line
I never made that, can you please explain how I do that with Eclipse so I don't have to research be myself and can focus on sending you the logs fast. |
You don't do that with eclipse. You do it with commandline tools jps and On Fri, Apr 4, 2014 at 12:59 AM, MBurchard notifications@github.com wrote:
|
Closing issue. Cannot reproduce /fix without more info. If you have more info that may help please raise a new issue ticket on the STS issue tracker: While we do keep an eye on the github tracker, it is not our main issue tracker. |
I am suffering the same problem with Windows 7. |
It's clear. Our whole developer team has this problem under Windows 7 or 8.1. |
As I said there's not much that we can do. The only way we can have a chance of getting some idea what is getting stuck is if you collect a trace of the stuck processes. That may shed some light. |
Same problem on windows 8. This is build.gradle file:
|
More useful info than what is in your build.gradle file would jps + jstack stacktraces of the stuck processes (gradle daeimon and STS). |
I had to change the Eclipse settings for Gradle IDE to not use the Gradle wrapper anymore.
So hole system was unusable with the wrapper.
As an Example converting an existing project into a Gradle Project using Eclipse starts a task that never finishes.
This also happens with other use cases.
The text was updated successfully, but these errors were encountered: