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
The idea of Markus Lux can be also applied with a Maven2 solution, with the profiles management:
org.codehaus.cargo
cargo-maven2-plugin
...
env-foo1
env
foo1
xxx
http://foo1/manager
foo
bar
env-foo2
env
foo2
dev
http://foo2/manager
foo
bar
...
Then, you will just need to run X times the mvn command, with the adequate parameter (-Denv=foo1, -Denv=foo2,...)
In addition to that, you can enhance this solution by using the Matrix feature of the Hudson Continuous Integration server. I gave a short explanation about this feature here.
Basically, you just define a "normal" Maven2 job in Hudson, and with the Matrix feature, you can ask Hudson to run this job several times, one per environment. In others words, you create your Hudson job, and then you define the "environment axis" with all possible value for the env parameter:
Hudson will then build the application with the mvn command and with the parameter -Denv=foo1.Once this build is finished, it will build the same application but with the parameter -Denv=foo2, and so on...
This way, Hudson will deploy your application in every environments...
I hope my solution will help you to reach your goals...