Importing maven artifact from other projects via group URL fails

Hello and good day,

I am trying to establish a setup with multiple projects on and some of these projects publish maven artifacts to the gitlab maven repository. I want to include those artifacts in other projects via dependencies in maven builds.

The following section within the pom.xml is the same for all projects:

As far as I have read from the documentation, you need to publish to the project. Hence the distribution management links are on a project level. The repository is on a group level, with the intent of importing multiple libraries which were published from other projects. Since no CI_GROUP_ID variable exists, I used the hard-coded URL. Group ID was copied from group overview on

This setup however is not working.

I have pushed an artifact successfully with the following result:

However, during the build of the dependent project, the artifact cannot be included with the error:
Failed to execute goal on project thirdpartyauth: Could not resolve dependencies for project Failed to collect dependencies at Failed to read artifact descriptor for Could not transfer artifact from/to gitlab-maven ( authorization failed for, status: 403 Forbidden → [Help 1]

I have set up a ci_settings.xml file which looks like this in each project:
<settings xmlns=“” xmlns:xsi=“

I am using the setting via "-s ci_settings.xml " in the maven options within the gitlab-ci.yml

What has worked in the past is to use a personal access token in the ci_settings.xml, set the project Id to the project the current project is dependent on and run ‘mvn deploy’ from my local machine. That way, the jar war present in the project repository. But this is not feasible to deploy the same package into every project where it is needed.

I am sure that I am overlooking something and it is a small detail, but I can’t find an issue at the moment.

Does anyone have a likewise setup and it is working for them? Or can you spot a mistake I am making.

Thank you for reading,

I got it working. JOB_TOKENS only have access to the current project.

I created a group access token at group>Settings>Access Tokens, create a group level CI environment variable containing the token and then using that token in the ci_settings.xml. You also need to switch the value of the tag to Private-Token