java ee - Maven multi-modules by features but sharing webapp -
i'm building multi-modules j2ee web application maven. web business application contains several sub-systems / modules. high modularity, easy-for-distributed-team-development, easy code navigation, easy deployment , upgrading, seperates web business application system features, , 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 have share webapp because whole project treated 1 web project ( 1 web.xml).
my question how seperate webapp different modules can run 1 website? (each business sub-system has individual webapp/html/jsp/js/css, can merge 1 website @ runtime)
thinking this, best advice have is: deploy separately separate team builds. if these sub-systems need independent each other, , can released independently makes no sense @ deploy them @ once.
if not possible because of requirements of system, best solution in terms of architecture combine front-end layer in 1 war component, dependent on different business-sub-systems (domain, dao , service). teams need share component can separate work across e.g. different folders or packages.
having said this, life in consulting not easy logical solutions possible that. here more down-to-earth answer:
in main pom file, use assembly-plugin create layover war of projects. reduce complexity of assembly, can include domain, dao, , service poms simple dependencies.
Comments
Post a Comment