Skip to content

Using Cargo to deploy to multiple containers

I am new to maven, but recently used it on a project that needed to deploy to two tomcat containers.  Cargo seems to be the plugin of choice, but I had a devil of a time trying to get it to deploy to two existing containers with one command.

I ended up using the ant-run plugin to just manually copy the war files where they needed to be.  This plugin usage also archives old war files and expands the new one, as well as deploying to the failover container.

Attached, you can see the relevant section of the pom.xml: cargo-deploy-two-containers

Hope this helps.