How to run multiple war files under Tomcat

(Andrey Izmaylov) #1

I’m trying to figure out how to run multiple war files under Tomcat6 with some context configuratiion files. I looks like Tomcat plugin allows you to run only one war file that is build in the project , while cargo plugin does require external tomcat installation , so that I can reference full path to containerHome directory. Can anybody help with this task?

(Benjamin Muschko) #2

What is it exactly is it you are trying to achieve and how does your project structure look like? I assume you have a multi-module project if you want to deploy multiple WAR files? Are all WARs supposed to run in the same container with the same port under different contexts?

(Andrey Izmaylov) #3

I’m trying to run WAR project that uses the other 3 wars as services, so it is not the multi-module project, since the source of those wars not included. So I have a task deploying and running all those wars under the same instance of Tomcat and the same port

(Benjamin Muschko) #4

I see. Yes, your observation is correct:

  • The Cargo plugin allows deployment of multiple WAR files but requires you to have a local installation of Tomcat. * The Tomcat plugin only allows you to run one WAR file in an embedded container (at the moment).

Why is downloading Tomcat and using the Cargo plugin a problem?

(Andrey Izmaylov) #5

Because it is an another external configuration that has to be taken care, especially if you trying to give the project to other remote developers and designers. Original idea was to have just Java & Gradle install - and that’s it. Now - adding Tomcat + environtment variables - so it starts resembling our old “ANT” style of development with painful troubleshootings.

(Benjamin Muschko) #6

If you want to you can open an issue for it on GitHub. I am not sure when I’ll get to it though.