To run my Maven application in Windows, I start the Cargo container with this command:
C:\code\myapp> mvn -P cargo.run
Then I use Ctrl-C to stop the Cargo container.
I want to do the same thing in Eclipse. I've created a run configuration for Maven:
This allows me to start the Cargo container, which I can view in the the Ecipse console:
At this point, Ctrl-C does nothing. I read here that Ctrl-C doesn't work inside Eclipse, but that I can stop the container with mvn cargo:stop
. As you can see in the screenshot, I'm trying to use this command but it doesn't do anything. There's also a Maven console in Eclipse, but this command doesn't do anything there either:
If I use the Terminate button in the console window (red square), it leaves an orphaned JRE instance that I have to stop manually, and the container is still running.
Is there another window where I should be trying to use this command? Is there a better way to start and stop the container in Eclipse?