What is the most minimal example of deploying a war to multiple tomcat servers using maven that can be written?
I\'ve tried the following URLs and asked the mailing
With regards to using multiple profiles, the lifecycle seemed to duplicate certain steps - e.g. the number of tests doubled when using profiles activated by variables. We found that using the catalina-ant library was much more effective ;) and its more "minimal". Use "executions" element to attach the "run" goal to a lifecycle phase to streamline it, or run after package: mvn package antrun:run
You could get a bit more fancy with the ant-contrib library, and create a for loop with a list of servers, but here's a static configuration for 2 hard coded server urls.
org.apache.maven.plugins
maven-antrun-plugin
1.6
tomcat
catalina-ant
6.0.29
The specific version of catalina-ant used above was manually deployed to our distributed maven repository, it can be found in the lib directory of tomcat distribution.