I am using gradle-cargo
plugin to deploy my war to tomcat server.
I call cargoDeployRemote
task for this. However it throws me an error when the application is already deployed on the server.
Deploying [C:\jenkins\workspace\myapp\build\libs\myapp.war]
:cargoDeployRemote FAILED
:cargoDeployRemote (Thread[main,5,main]) completed. Took 1.081 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':cargoDeployRemote'.
...
...
BUILD FAILED
How to over come this? Is there a way where I can query the context url and find if it is already deployed?