0

Actually in a multimodule maven architecture we usually create module by web, services, DAOs topics and we end up with the following schema (for a project with 3 submodules):

POM paernt
|        |service
|                |Submodule**1**Service.java
|                |Submodule**2**Service.java
|                |Submodule**3**Service.java
|        |dao
|            |Submodule**1**DAO.java
|            |Submodule**2**DAO.java
|            |Submodule**3**DAO.java
|        |Web
|            |Submodule**1**Controller.java
|            |Submodule**2**Controller.java
|            |Submodule**3**Controller.java

So I'm wondering how can I gather submodules independently and use the following architecture instead:

POM paernt
|        |submodule**1**
|                |controller
|                            |Submodule**1**Controller.java
|                |service
|                         |Submodule**1**Service.java
|                |dao
|                    |Submodule**1**Service.java
|                |web
|                    |jsppages
|                            |Submodule**1**page.jsp
|        |submodule**2**
|                |controller
|                            |Submodule**2**Controller.java
.......
|        |submodule**"**
|                |controller
|                            |Submodule**3**Controller.java
......

Note please that I find that the second architecture is more significative and better than the first one, and useful when we wish to deactivate a submodule by only commenting it in the parent pom.xml file (without resorting to maven profiles), and finally I think that it ensures a weak coupling schema between submodules.

Thank you.

1 Answers1

0

Well, I think this is the same architecture used by spring framework itself, it uses jar that contain configuration files.