Where in Maven should multiple domain and persistence classes go through?

I have a Maven project that I want to split into parts so that my domain and persistence objects can be reused by other maven projects. What will be considered the best approach?

  • Move the domain and persistent objects to a separate project and let it be the parent POM for any other projects that it needs

  • Put it in a separate project, but make it a jar, which will be used as a dependency through POM.xml in other projects.

  • Other?

+3
source share
2 answers

I would not become his parent project. It sounds like you need two separate projects; one for the domain and one for saving.

, , ( ), . , Maven.

+1

, . "-domain", . xml-Hibernate.

0

Source: https://habr.com/ru/post/1785103/


All Articles