Attached patch, and changing fix version to 1.2. Also unassigning so that committers can review and update.
When an app is undeployed (as part of a redeploy) any other apps that depend on it are stopped.
Trying to track down all apps that depend on the current app so that they can be automatically restarted is too much effort to expend in the 2.0.x branch.
If there is sufficient interest - a new JIRA should be opened in a more current/active branch.
I think deploy tool should throw an error when trying to deploy to an existing configuration.
redeploy command should be used so user is sure what he's doing.
moreover, undeploy and deploy should do it too.
but should never redeploy an application, IMHO
Moving to 2.0.x
I think we should retain both deploy and redeploy commands as they are right now and provide an "override" option so that deploy command redeploys and redeploy command deploys if necessary.
We can if we want to it, but I think this need to be decided by community.
Shoule we eliminate redeploy altogether as deploy will anyway redeploy whereever necessary!!
In CommandDistribute, before deploying and application check if the application with same targetID exists. If it exists instead of distributing and starting, redeploy it.
Added private method checkExisting() to find if the application is already deployed.. This code requires to use getCommand() method of DeployTool.java which was private, made it public for command redirection.