Comments (17)
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.
from eclipse-integration-gradle.
Also the other Options are set to default cause I just created a new workspace for this test.
Now I created a new Java Project Demo01.
Then I right click the project, click on Configure > Convert to Gradle Project.
Now it starts working. The Project Icon changes but the task doesn't stop.
After 5 minutes I still wait for it to finish...
It hangs at 25%.
I havent't found any additional output in any console or so.
Eclipse must be killed now cause you can't work anymore...
from eclipse-integration-gradle.
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?
from eclipse-integration-gradle.
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".
For the project to work properly it really already has to be a Gradle project (i.e. have a build.gradle file).
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.
from eclipse-integration-gradle.
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.
from eclipse-integration-gradle.
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.
from eclipse-integration-gradle.
Possibly related: https://issuetracker.springsource.com/browse/STS-3495
That particular problem is reportedly fixed in recent version of Gradle.
This is not the first and only time I've heard of issues connecting to the daemon on Windows.
But I can't find other bug tickets at this time.
The problem is usually not a bug in the tooling but something else preventing the connection between eclipse and the daemon.
from eclipse-integration-gradle.
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.
from eclipse-integration-gradle.
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.
from eclipse-integration-gradle.
Good Morning,
so many comments during the night, so I'll give my best to respond.
BTW, is that your initial setup? Eclipse for JEE dev + Groovy Eclipse + Gradle Eclipse Integration?
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.
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".
For the project to work properly it really already has to be a Gradle project (i.e. have a build.gradle file).
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.
Also importing is not possible, It stuck after clicking on Build Model.
# build.gradle
apply plugin: 'java'
sourceCompatibility = 1.7
repositories {
mavenCentral()
mavenLocal()
}
Do you have any Firewall or Network proxy in your network environment?
In the office we have a firewall, but Gradle and Gradle Wrapper is working from the commmand line.
At Home I don't have a firewall.
In Addition there is the standard Windows firewall but with default settings. It asked my sometime before when starting with Gradle but since then it's quiet.
The Problem is always there, not only in the office or at home.
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.
The distribution was downloaded before. In addition my Internet connection speed is always more then 25 MBit/s.
An additional information at this point. If I use the following build.gradle
apply plugin: 'java'
sourceCompatibility = 1.7
repositories {
mavenCentral()
mavenLocal()
}
task wrapper(type: Wrapper) {
gradleVersion = '1.10' # 1.11 is also working here
}
And have the wrapper initialized by command line gradle wrapper
the import will succeed and not stuck.
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).
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.
from eclipse-integration-gradle.
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
jstack. They are easy to use and are probably already installed on your
machine.
Just google or read their man page. I understand you may not feel like
doing that, but we are just as busy as you... and this seems to be
a problem that specifically affects you so you will have to do some
'legwork' if you want our help trying to diagnose and fix it.
On Fri, Apr 4, 2014 at 12:59 AM, MBurchard [email protected] wrote:
Good Morning,
so many comments during the night, so I'll give my best to respond.BTW, is that your initial setup? Eclipse for JEE dev + Groovy Eclipse +
Gradle Eclipse Integration?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.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".
For the project to work properly it really already has to be a Gradle
project (i.e. have a build.gradle file).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.
Also importing is not possible, It stuck after clicking on Build Model.build.gradle
apply plugin: 'java'
sourceCompatibility = 1.7
repositories {
mavenCentral()
mavenLocal()
}[image: gradle import stuck]https://cloud.githubusercontent.com/assets/4256302/2612585/5e10cd7a-bbc6-11e3-8f31-a0633ca705f2.png
Do you have any Firewall or Network proxy in your network environment?
In the office we have a firewall, but Gradle and Gradle Wrapper is working
from the commmand line.
At Home I don't have a firewall.
In Addition there is the standard Windows firewall but with default
settings. It asked my sometime before when starting with Gradle but since
then it's quiet.
The Problem is always there, not only in the office or at home.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.The distribution was downloaded before. In addition my Internet connection
speed is always more then 25 MBit/s.
An additional information at this point. If I use the following
build.gradleapply plugin: 'java'
sourceCompatibility = 1.7
repositories {
mavenCentral()
mavenLocal()
}
task wrapper(type: Wrapper) {
gradleVersion = '1.10' # 1.11 is also working here
}And have the wrapper initialized by command line gradle wrapper the
import will succeed and not stuck.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).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.Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-39540375
.
from eclipse-integration-gradle.
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:
https://issuetracker.springsource.com/browse/STS
While we do keep an eye on the github tracker, it is not our main issue tracker.
from eclipse-integration-gradle.
I am suffering the same problem with Windows 7.
from eclipse-integration-gradle.
It's clear. Our whole developer team has this problem under Windows 7 or 8.1.
So it's really simple to reproduce.
The problem is not existent under Mac OS und Linux (Ubuntu 14.04).
I switched to Ubuntu and my colleagues don't use the wrapper!
from eclipse-integration-gradle.
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.
Even then I can't promise you anything.
from eclipse-integration-gradle.
Same problem on windows 8.
When importing a gradle project from 'import gradle project' it hangs and I need to kill java process to quit sts.
Using java version "1.8.0_05"
Gradle version 2.0
Windows Firewall deactivated.
This is build.gradle file:
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
repositories { mavenCentral() }
dependencies {
compile 'org.springframework:spring-core:3.2.3.RELEASE'
compile 'org.springframework:spring-webmvc:3.2.3.RELEASE'
compile 'org.slf4j:slf4j-api:1.7.5'
runtime 'org.slf4j:slf4j-log4j12:1.7.5'
testCompile 'org.springframework:spring-test:3.2.3.RELEASE'
testCompile 'junit:junit:4.11'
testCompile "org.mockito:mockito-core:1.9.5"
testCompile "org.hamcrest:hamcrest-library:1.3"
testCompile 'javax.servlet:javax.servlet-api:3.0.1'
}
test {
testLogging {
// Show that tests are run in the command-line output
events 'started', 'passed'
}
}
task wrapper(type: Wrapper) { gradleVersion = '1.6' }
from eclipse-integration-gradle.
More useful info than what is in your build.gradle file would jps + jstack stacktraces of the stuck processes (gradle daeimon and STS).
from eclipse-integration-gradle.
Related Issues (20)
- Could not find tools.jar HOT 1
- “refresh all” update the eclipse .project file by force
- Classpath sorting removes test folder HOT 1
- Gradle-STS-to-Buildship message HOT 2
- Fail to initialize EclipseModelBuilder in gradle 2.14.1 if "Use Custom Tooling Model" is checked. HOT 4
- Alternative Update Sites Link To AccessDenied XML HOT 1
- import Gradle project HOT 1
- Trying to import project HOT 1
- Tooling API version older than 3.0 in sts 3.9.1.201710100515-RELEASE HOT 2
- Mark Gradle's build directories as derived resources HOT 3
- http proxy Ineffective HOT 5
- ":..:DependentProject" not supported in settings.gradle HOT 1
- I don't have an extension tab HOT 2
- Gradle IDE upgrade from 3.6.4 to 3.7.0 fails for missing dependencies HOT 4
- What is the roadmap for this plugin with the presence of the BuildShip plugin? HOT 2
- Remap Jars to Gradle Projects ignores version HOT 5
- Offline installation requires HOT 4
- Gradle plugin trying to download gradle.zip from internet even though Gradle Home pointed to local folder HOT 6
- "Updating Gradle Classpath" happens during/after "Building workspace" HOT 1
- NPE during Eclipse Gradle project refresh HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse-integration-gradle.