Getting artifacts by Maven group level API endpoint doesn't work
Summary
The API Maven Endpoint group package maven path does not give any resource Implemented in MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8798
Steps to reproduce
- Create a project dependency (simple maven project) in a group
- Upload it to maven artifactory by building it over gitlab (using distributionManagement in pom.xml)
- Use the dependency in another project's pom.xml (in the same group!) and specify a group level repository in that pom.xml which uses the dependency
- Run maven install or build or simply to to resolve the dependency
Example Project
Example group with both projects: https://gitlab.com/sample-group-for-maven-bug
Failing Build: https://gitlab.com/sample-group-for-maven-bug/my-group-test-project/-/jobs/154291902
(Feel free to request access to my demo group)
What is the current bug behavior?
Maven tries to resolve the dependency through the group level endpoint but doesn't receive any resource
What is the expected correct behavior?
Maven should resolve the dependency through the group level endpoint and receive a metadata file, a pom.xml and a .jar file
Relevant logs and/or screenshots
Running with gitlab-runner 11.7.0-rc1 (6e20bd76)
on docker-auto-scale 72989761
Using Docker executor with image maven:3.6-jdk-11 ...
Pulling docker image maven:3.6-jdk-11 ...
Using docker image sha256:ae7e2334f667433ebbc1529d055d57e76eee785baf02421a4502fd8fd1b5e152 for maven:3.6-jdk-11 ...
Running on runner-72989761-project-10631012-concurrent-0 via runner-72989761-srm-1548946640-cee1aac5...
Cloning repository...
Cloning into '/builds/sample-group-for-maven-bug/my-group-test-project'...
Checking out a6757f73 as master...
Skipping Git submodules setup
Checking cache for default...
FATAL: file does not exist
Failed to extract cache
$ mvn $MAVEN_CLI_OPTS compile
[ERROR] Failed to execute goal on project my-group-test-project: Could not resolve dependencies for project de.jdickel:my-group-test-project:jar:0.0.1-SNAPSHOT: Could not find artifact de.jdickel:my-group-test-project-dep:jar:0.0.1-SNAPSHOT in gitlab-maven (https://gitlab.com/api/v4/groups/sample-group-for-maven-bug/packages/maven) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
ERROR: Job failed: exit code 1
Output of checks
This bug happens on GitLab.com
Edited by Jonas Dickel