I’m working on automatically deploying to a remote JBoss AS 7.1.1 server from a Jenkins build server as part of a build pipeline and have a small jar file that I call from ant (based on this).
My question is how do I find out if an application is already installed? Doing a deploy plan will fail if the application is already deployed(I could catch the exception that’s thrown but that’s not great).
You can read the resource before doing the deploy. From there you can either redploy it or do nothing.
Here is an example that would work on a standalone server.
If you’re using maven, there is a maven plugin you could use too.