Package repo: disallowing duplicates for a Maven repo prevents jar classifiers (flavors/variants) from being uploaded
Summary
Disallowing duplicates for a Maven repo prevents jar "flavors/variants" from being uploaded, e.g. "-sources.jar" and "-javadoc.jar" files.
Uploading lib-java-1.5.2-tmp-20210322.160800-1.jar to /api/v4/projects/123123/packages/maven/com/grp/lib-java/1.5.2-tmp-SNAPSHOT/lib-java-1.5.2-tmp-20210322.160800-1.jar
> Could not PUT 'https://gitlab.com/api/v4/projects/123123/packages/maven/com/grp/lib-java/1.5.2-tmp-SNAPSHOT/lib-java-1.5.2-tmp-20210322.160800-1-javadoc.jar'. Received status code 400 from server: Bad Request
As you can see above the only difference between the 2 jar artifacts is the "-javadoc" qualifier appended to the latter, which fails. It would seem qualifiers don't make an artifact "different", although it should.
After re-enabling duplicates the above publishing works.
Edit: another symptom of this (though not 100% sure) is this build warning
Cannot upload checksum for pom-default.xml because the remote repository doesn't support sha-256. This will not fail the build.
Steps to reproduce
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)