How to build parent-child maven project

Hi to all!
I’ve started to use gitlab by few days, i read some documentation and look some videos to get a better idea on how to create a configuration gitlab file to start the pipeline.
Now, i would like to make some experiments on how to build my project, that have this scenario:

  • Core library (maven / spring boot) that contains all the core functionality
  • Project A, that import the Core library as dependency (this is the real project)
  • Project B, same as project A
  • Project C etc

So each project depend on Core library, so before build Project A i need to build their Core library.
In a local enviroment this is simple because when i build Core library thats are stored in my local .m2 folder and all works without problem.

But, how i can orchestrate this scenario using Gitlab ? How i can build the core library first, when the Project X need to be built ?

The only idea that i have is to push the Core library on Artifactory and when the Project X need to be compiled, the dependencies are retrieved from artifactory (already compiled).

Sorry if this question is simple, but i want to start in the right way :slight_smile:

Thanks a lot!