Skip to content

Maven Repo - auto build job fails with non-resolvable parent POM; could not find artifact.

Summary

Auto-build job using gitlab maven repo fails with the message that non-resolvable parent POM for ...: Could not find artifact ..." and 'parent-relativePath' points at wrong local POM @ line 14, column 11

Steps to reproduce

  1. Create a group with a project that will be used for managing dependencies (separate from maven project)
  2. Import all needed dependencies to the project
  3. Create a maven project that uses a dependent parent pom; in the pom.xml file, specify the group maven endpoint for the repository and and project level endpoint for distribution management, as indicated in this documentation: https://docs.gitlab.com/ee/user/packages/maven_repository/#group-level-maven-endpoint
  4. Be sure that the user running the job has at least developer permissions at the group and project levels
  5. enable auto devops or create a ci file in the repo that uses the auto devops template

Example Project

What is the current bug behavior?

Build job fails with an error like this one: Non-resolvable parent POM for com.bsci.latitude.nxt.web:Static:Express_B.06.00-SNAPSHOT: Could not find artifact com.bsci.latitude.nxt:nxt-parent:pom:Express_B.06 in gitlab-maven (https://gitlab.com/api/v4/groups/8605538/-/packages/maven) and 'parent.relativePath' points at wrong local POM @ line 14, column 11

What is the expected correct behavior?

Build should find the artifacts needed and succeed

Relevant logs and/or screenshots

We validated that the dependency exists in the appropriate place: image

We also validated that running the build job directly using the maven ci yml template succeeds.

Output of checks

This bug happens on GitLab.com