Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 188139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:57:05+00:00 2026-05-11T15:57:05+00:00

What is the most minimal example of deploying a war to multiple tomcat servers

  • 0

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 list, but not coming up with anything that was short and would simply work.

  • http://www.nabble.com/Deploying-to-Multiple-Servers-at-Once-td21592419.html

The example should have the servers defined in the example somewhere (with sample usernames/passwords)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:57:06+00:00Added an answer on May 11, 2026 at 3:57 pm

    The idea of Markus Lux can be also applied with a Maven2 solution, with the profiles management:

    <build>     <plugins>         <plugin>             <groupId>org.codehaus.cargo</groupId>             <artifactId>cargo-maven2-plugin</artifactId>         </plugin>     </plugins>     ... </build> <profiles>     <profile>         <id>env-foo1</id>         <!-- Activated when -Denv=foo1 is given as parameter. -->         <activation>             <property>                 <name>env</name>                 <value>foo1</value>             </property>         </activation>         <properties>             <deploy.env>xxx</deploy.env>             <tomcat.manager>http://foo1/manager</tomcat.manager>             <tomcat.manager.username>foo</tomcat.manager.username>             <tomcat.manager.password>bar</tomcat.manager.password>         </properties>     </profile>      <profile>         <id>env-foo2</id>         <!-- Activated when -Denv=foo2 is given as parameter. -->         <activation>             <property>                 <name>env</name>                 <value>foo2</value>             </property>         </activation>         <properties>             <deploy.env>dev</deploy.env>             <tomcat.manager>http://foo2/manager</tomcat.manager>             <tomcat.manager.username>foo</tomcat.manager.username>             <tomcat.manager.password>bar</tomcat.manager.password>         </properties>     </profile>     ...  </profiles>     

    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:

    • foo1
    • foo2
    • foo3
    • …

    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…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 86k
  • Answers 86k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use %~d0 to get the drive letter. Something… May 11, 2026 at 5:21 pm
  • Editorial Team
    Editorial Team added an answer Well assuming you are doing something with the iphone or… May 11, 2026 at 5:21 pm
  • Editorial Team
    Editorial Team added an answer Add a string at the end of your URL to… May 11, 2026 at 5:21 pm

Related Questions

My motto for Java is just because Java has static blocks, it doesn't mean
There are thousands of vi tutorials on the web, most of them generically listing
I was curious as to what other shops are doing regarding base application frameworks?
No matter what I do sys.exit() is called by unittest, even the most trivial
I'm working on porting a Visual C++ application to GCC (should build on MingW

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.