I am using a job in Junkins to build my application (.ear) and then deploy it in Glassfish. I want to execute asadmin undeploy myApp
before I deploy my application (the new version). The problem is in the 1st execution there is no application deployed so executing asadmin undeploy myApp
generates an error. Any suggestion to deal with this situation. Any proposition is the most welcomed. Thank's.
EDIT :
Correct me if I am wrong in my method, maybe I am doing things wrong! Is this the right way to have a chain of production of a sowtware? Do I have to stop the server and restart it?