Maven Project and dependency

I have two project in gitlab for example Project2 depend to Project1 . When project1 build with mvn clean install , project1.jar install in local repository and when project2 build i got exception that project1 dose not exist in repository (local and public) . I think there are two way to solve this problem

  1. publish dependency in public repository
  2. build two project in same runner

How can run solution 2 with Gitlab CI/CD ?

Hi Aziz Khan, Request u if you can let me know how to set up docker runner for GITLAB maven project. I have set up a docker runner for Maven project, but i get this error.

ERROR: Preparation failed: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.18/info: open //./pipe/docker_engine