Microservice architecture design (spring maven multi-module project) to create a working ci/cd flow

285 Views Asked by At

I'm currently learning gitlab ci/cd and ran into a problem. I am a java developer and I have written a multi-module maven project with microservice architecture. At the root of the project, I have a BOM file in which the heir modules are declared and dependencies are declared in the dependencyManagment tag so that all microservices use the same versions of spring-cloud. Each module has its own repository. Logically, each module has its own database and pom refers to the parent (bom) to import dependency versions. The question is that when writing gitlab pipelines, I get an error: Non-resolvable parent POM for (module name) ... It is logical that he has nowhere to get dependency versions, etc., but in this case, how to control the versions of the libraries of all modules or can maybe it's not needed at all? Help me come up with a work plan. At the moment the diagram looks like this: root(bom) -> childModule(pom) alsoRoot -> childModule(pom)

1

There are 1 best solutions below

2
Harry Coder On

First, try this link for your error.

Also, for your project unless it represents a whole microservice, it is fine. But, it seems like you have implemented many microservices in one project. Every microservice should be an isolated project with its own dependencies and release process. Each microservice project should be:

  • Independent
  • Autonomous
  • Easy to deploy individually