Deploying a web application on two Tomcat servers on different machines with a different operating system


I would like deploy my webapp both on Windows Tomcat 7 and Unix Tomcat 7 one after another or at the same time, if possible. Currently, I am able to successfully deploy my webapp on Windows Tomcat using tomcat-maven-plugin and calling mvn tomcat7:redeploy. But the limitation is that I have to change my pom so that it points to Unix Tomcat if I want to deploy the webapp on Unix which is very painful. Any ideas on how this can be accomplished ? Please guide.





You can do it with creating two separate build profiles one for each machine and execute build against both profile one after another