I have a project with a regular structure.
project_a/
├─ src/
│ ├─ main/
│ │ ├─ java/
│ │ │ ├─ com/
│ │ │ │ ├─ myproject/
│ │ │ │ │ ├─ model/
│ │ │ │ │ ├─ Application.java
├─ pom.xml
The com.myproject.model
package contains a large number of entity classes.
I need to create a new maven project that will use these entities.
project_a/
├─ project_b/
│ ├─ ...
│ ├─ pom.xml
├─ ....
├─ pom.xml
What is the best way to do this? From my ideas, this is to take the entity into a separate module (in general, to make a modular project).
And can I just import the com.myproject.model
package into project_b
as if it were a projcet_b package. What are the consequences of this?