How to stop ratpack run under netbeans IDE? - netbeans

Problem:
After starting ratpack application under netbeans IDE there's no way to stop it.
Steps to reproduce
Checkout project: https://github.com/akhikhl/ratpack-helloworld.git
Start netbeans 7.4 (Gradle Support IDE plugin must be installed)
Open project ratpack-helloworld
Invoke menu command "Run/Run Project" - gradle task starts nicely, app waits on port 5050.
Now try to stop it:
There's no task for stopping ratpack app
Ctrl+Break has no effect
menu command "Run/Stop Buid/Run..." has no effect
when clicking "Cancel Running Task button, IDE asks "Are you sure you want to cancel...", then it reports "Build failure", but run task is still running.
Workaround
Restarting IDE kind of solves the problem, but eliminates fun factor from using ratpack.
Question
Any ideas on how to stop ratpack under netbeans the legitimate way?

You can use the [X] button in the bottom bar to cancel the gradle run task.

Related

Is there any way to stop a mavenized build triggered from eclipse

Can be a dumb question But too curious to know a way or a plugin to do this.
I am triggering a mavenized project build through eclipse as
Run As -> Maven build
So once i done it can it be aborted before it is getting completed ? Like Some times i forgot to change some config so I want to redo . I know how to do it if it is triggered via cmd. But if there is way for this then it would be great ..
The Maven build run should be displayed in the Console view. There should be a toolbar action (red square) in the Console view to terminate the run:

Worklight v6 - Build Environment and Project Builders

Migrating from Worklight Studio 5.0.6 to 6.0
We observe a small, but undesirable, difference in behaviour, or maybe a confiuguration chenge is needed somewhere we failed to find.
In v5.0.6 when one selects an environment and requests Build Environment and Deploy, the project's Builders are first executed. In v6.0 this does not appear to be the case, unless there's a option somewhere ...
The use case is that we have some pre-processing carried out by an ant task installed as a project builder. In v6.0 we now need to rememeber to run a Build Project and then build the environment.
Is there an option to control this behaviour?
this is how to run ant task in worklight 5.0.x - 6.x:
create the Ant file (build.xml):
Navigate to project->properties->Builders->new->Ant Builder. press ok
in "Main" tab set the name for the builder and choose your Ant file (build.xml):
in "Targets" tab choose when to run the Ant file (in this exemple in Auto Build):
press OK
press OK
run "Build All and Deploy":
Success:
This is an open defect in Worklight 6.0.0.x and 6.1.0.x.
There is currently no workaround for it.

How to repeatedly run Wicket/Maven/Jetty project in Eclipse?

Thanks to those info http://www.ralfebert.de/blog/wicket/wicket_eclipse_setup/ and How can I begin using Wicket? now I am able to edit Java code and html files with Eclipse, and run it to get Jetty started.
However there are still two problems which do not allow me to repeatedly run the project:
I have to stop previous run in order to run it again
unlike regular Java project, where I could simply choose "run", now I have to go into "Run Configuration", select Maven Build type, and below select my project to run, and then finally click "run"
ad.1. How to make Eclipse stop the previous run on next run -- i.e. I would like to just run project, and Eclipse should either run it, or stop previous one and run it again
ad.2. how to "bind" Run/Run to running my configuration (Maven Build / my project)?
Thank you in advance for help.
Another simply option is to use a Start class with a main that runs and embedded jetty. Then you will be able to run and debug your application as a normal desktop java application with your IDE.
Check the example start file that comes with the wicket quickstart here:
https://github.com/jordeu/wicket/blob/master/archetypes/quickstart/src/main/resources/archetype-resources/src/test/java/Start.java

Popup window blocks test in Eclipse

I'm running the pde test in ant build with parameter:
-application org.eclipse.pde.junit.runtime.uitestapplication.
When the eclipse instance is started while running the test, it pops up a dialog window (named "Usage Data Upload") which blocks the test run until I manually close it.
Any suggestions on how to fix this?
Exclude bundles com.instantiations.eclipse.usageprofiler and com.instantiations.eclipse.usageprofiler.ui from your product.

Eclipse "Waiting for virtual machine to exit"

I'm working on a blackberry project using eclipse and bb-ant tools. I've created a build.xml file to perform the build. Everytime I try to run an Ant build, eclipse pops up the progress dialog and it hangs stating "Waiting for virtual machine to exit."
I downloaded an open source Blackberry project that has an ant build and it is showing the same behavior.
Does anyone have any suggestions?
Edit:
I used the command line to build my xml file and it built fine. However, when I tried from Eclipse it still hangs.
I've tried both the standard eclipse plugin directory and the path I downloaded ant to.
You could check if your ANT_HOME settings are correct (see also this blog post).
"Window > Preference > Ant > Runtime": "Ant Home Entries".
if the jars files are from a plugin directory (beside the default 'org.apache.ant_1.7.1.v20090120-1145' one) and not an independent ant installation, that might explain the problem.
Try clicking the "Ant Home" button on the right side and setting up ant home such as "C:\path\to\apache-ant-1.7.0"
There are similar bugs to this kind of situation (bug 173419, ticket 91).
It is worth checking the JVM used for the project.
It can also occurs when a ant task is poorly implemented.
You had the problem because the java version ant tries to run with is incorrect.
By default, eclipse will try to run the ant build with the java version it uses to compile the java files (Blackberry JRE), which won't work! You need to change the jre version by choosing "Run As... > Ant build". Before clicking run, go to the JRE tab, choose "Separate JRE:" and change "Blackberry JRE " to a standard java JRE. Press the run button and everything should work correctly.
I hit this problem also. Although I never used the same solution, you pointed me in the same direction.
I was using a ant file as a builder in my project, and I disabled the Allocate Console build option. This is when I hit the 'Waiting for virtual machine to exit'.
So I simply enabled the Launch in background option and it worked.