Each webapp will need a different root context, which comes with the tomcat7 maven plugin with a path value.
You deploy each web application from your own POM yourself. But since you have a project like pom that forces others to create, you should be able to redeploy all three at once.
Please note that there are two ways to use this plugin:
- You can deploy without war. It simply compiles java files and deploys them directly to tomcat.
- You can launch a war. Maven will have to build a war, and then it will be deployed to Tomcat. This is more like deployment of production and helps to verify the correctness of the deployment of war.
So. Transfer your XML plugin to each of the three βmodulesβ of pom files. They will have a type of war. Then add this configuration:
<path>paysWeb</path>
under the <configuration> for the first "module". Of course, you use different names for the <path> for each of the modules.
Here's more info: http://tomcat.apache.org/maven-plugin-2.0/tomcat7-maven-plugin/usage.html
source share