I have a web app project which is now growing in to separate web submodules containing their own ejbs and jsf webpages.
The project structure is going to look like something following.
- parent-project
- common-module
- creditcard-module
- bankpayment-module
- some-more-payment-modules ...
- war-module
Each module except common module has its own ejbs and jsf pages.
If possible I need each module to be a standalone war and build a big war with the war module.
EDIT
Current structure of the project
war module --
--| persistenceunit |
--| entities |
--| ejbs |
--| cdi managed beans |
--| controllers |
--| jsf-pages |
--| resources |
The different business units are just separated by packages. Now it is required to be able to version the different business units separately i.e. different mvn projects for each.
Structure to achieve:
Common module --
--| persistenceunit |
--| dao helpers |
--| common ejb services |
--| common managed beans |
--| jsf-templates |
--| common resources |
Creditcard module --
--| related entities |
--| ejb services |
--| related managed beans |
--| jsf-pages |
--| specific resources |
And the same for other business modules, moreover one master war / ear module to contain all the wars.
Important: is it possible to share persistence unit ?
Will cdi work across the modules (at the end it is a single ear/war) ?
In essence the idea is to modulerise the project according to business needs and not purely technical layers.
How should I achieve this with maven ?