I want to create a multi-module maven project. One module - repository - to work with the database (entity, dao). The remaining modules are projects, in one spring-boot, in another spring-mvc, etc., they all use the repository module as a dependency and have different types of packaging (war, jar). In addition, CI (Jenkins, TeamCity) is configured, which, when a commit is received in the git repository, rebuild the corresponding projects. So, for each project module in maven, a separate git repository is needed. But the question arises how to track the success of the assembly of all projects when a single module changes, for example, the same repository. Or do I have the wrong approach to organizing the entire project? I would like to know the opinion, how correctly it is implemented in real projects, what other ways are there to manage this zoo?

  • one
    there is no "only right" answer to this question. so how many people are so many opinions. Try asking a more specific question. but in the initial stage it is better to do everything in one repository and possibly as a single monolith - without modules. - Mikhail Vaysman
  • The initial stage has already been passed, the projects live separately in their own maven-application and, accordingly, git-repository. However, changes in the dao module occur regularly, and this implies the need for changes in other projects, I would like to make a separate work module with the base - carapuz
  • In my opinion, such a division into modules brings more harm than good. the module must be allocated to a separate entity if it can be changed independently of others and / or if it is developed by a separate team. - Mikhail Vaysman
  • if the "modules" live their life as separate applications, but there are compile and runtime dependencies, then why not put out these "modules" as artifacts in the artifactory and not add corresponding dependencies in the pom-files of all dependent projects? Sorry for the tautology :) - Evgenii Baulin

1 answer 1

Try to create a common repository based on submodules and configure the build to this repository.