Bouiaw
(bouiaw)
November 19, 2011, 4:27pm
1
Hi,
With Gradle 1.0-milestone-6 (but also with 1.0-milestone-5), Gradle hangs when I run “gradle jettyRun” on quickstart webApplication sample
Output is :
C:\Apps\gradle\samples\webApplication\quickstart>gradle jettyRun
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
Building > :jettyRun
And it hangs forever. I am under Windows 7 64 bits, not behind a proxy and have no firewall. I tested this on 2 computers, and the same issue occured.
Regards
The build waits for jetty to be stopped. And Jetty’s sitting there waiting to serve up HTTP requests.
Though, it looks like the sample pick an arbitrary port to run Jetty on, and doesn’t tell you which one. Which makes it pretty useless. You’ll need to remove these lines from the sample build.gradle:
[jettyRun, jettyRunWar]*.doFirst {
project.httpPort = portFinder.nextAvailable
project.stopPort = portFinder.nextAvailable
}
You can also tweak the ‘httpPort = 8163’ setting to choose which port you’d like Jetty to listen on.
Bouiaw
(bouiaw)
November 22, 2011, 11:29pm
3
Perfect, it works. Thanks.
I’ve updated the sample, too.
Oh, and running ‘gradle jettyRun’ task displays this now:
:compileJava
:processResources
:classes
> Building > :jettyRun > Listening on port 8080
Bouiaw
(bouiaw)
November 23, 2011, 7:51pm
6
Nice, I am going to test Gradle on a real life project and blog about this from my “Maven expert user” point of view.