I'm building a multi-modules J2EE web application by Maven. The web business application contains several sub-systems / modules. To get high modularity, easy-for-distributed-team-development, easy code navigation, easy deployment and upgrading, we seperates the web business application system by features, and then by layer. Here's maven hierarchy:
|--business-sub-system-1
| --domain
| --pom.xml
| --dao
| --pom.xml
| --service
| --pom.xml
| --webapp(presentation)
| --pom.xml
|--pom.xml
|
|--business-sub-system-2
| --domain
| --pom.xml
| --dao
| --pom.xml
| --service
| --pom.xml
| --webapp(presentation)
| --pom.xml
|--pom.xml
|
|--business-sub-system-3
| ...
|--business-sub-system-4
|...
|--business-sub-system-5
|...
|...
|pom.xml
but we have to share the webapp because the whole project will be treated as one web project ( one web.xml).
My question is how to seperate the webapp into different modules but can run as one website? (Each business sub-system has individual webapp/html/jsp/js/css, but can merge as one website at runtime)