Maven deploy from Pipeline won't work. 2 days of nothing but HELL!

Forgive my frustration since the issue I am having is so horrible and frustrating. It seams as if no one on the Internet knows how to fix this!!

I am a new user of gitlab. The whole platform looks very promising and so I started using gitlab for my project. My project uses several maven projects and the first project is only a pom.xml file. It is a maven dependency that all my other projects use. So I want to deploy this dependency to the Package registry and then the other maven projects can use it.

For 2 days now I have been trying to get this to work and unfornately all I can say is that Gitlab is absolutely HELL!!!. I create a project and put a pom.xml in it.

In the repositories section I have this:


I am using the group package registry since I want all my packages in the same spot. I dont want 10 different urls for all my projects. I then create a ci_settings.xml (Why the hell can’t I just upload a settings.xml somewhere in gitlab?) I now have to change my project structure because of gitlabs failings. In the ci_settings.xml I put this:

<settings xmlns="" xmlns:xsi=""

My .gitlab_ci.yml looks like this:

image: maven:latest

  MAVEN_CLI_OPTS: "-s ci_settings.xml"
  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"

    - .m2/repository/

  stage: build
    - mvn $MAVEN_CLI_OPTS compile

  stage: deploy
    - mvn $MAVEN_CLI_OPTS deploy
    - master

And then I check it all in. The pipeline runs and it doesnt work because the Deploy token is missing. I generate a group deploy token and it gives me a username and password. The deploy token in ci_settings.xml has 1 variable. The group token has 2 fields (username/Password). What do I need to fill in there???

Is thiseven the right approach? Gitlab is turning into the biggest disaster I have ever used.

This is the error I see in the log:

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project dependencies: Failed to deploy artifacts: Could not find artifact com.project:dependencies:pom:1.0-20210107.111616-1 in gitlab-maven ( -> [Help 1]

Hi @cybergen007 , any luck so far?
I’m facing a similar issue over here and I’m still unable to deploy artifacts to a group-level repo.
Project-level repo deploys work fine though.

Same issue here. Also tried many things. No luck at all.

Hi @devorgint , I also tried a number of combinations (deploy tokens, private tokens, alternative URLs…) and no luck at all.

It seems to be some kind of API issue, since the result of calling the URL

is a

{"error":"404 Not Found"}

, while calling

results in

{"error":"package_id is invalid"}