Remove version tag from outer maven-metadata.xml #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In Sonatype Nexus Repository OSS 2.29.2-02, I started receiving 400 bad request errors when uploading an artifact using this grunt plugin. Unfortunately, I do not track updates to the Sonatype instance and the artifact had not been built for several months so I cannot pinpoint the first version of Sonatype in which the issue began to occur in.
Changes and rationale
Upon further inspection, the curl command to upload the outer maven-metadata.xml file was the culprit. Removing the version tag in the outer maven-metadata.xml template resolves the 400 error. On comparison with another artifact uploaded using the standard Gradle publish plugin, there is no version tag nested below the metadata tag in the file it generates either.
I only tested uploading to Sonatype Nexus 2.29.2-02 so there is a slim possibility that uploading to older versions or a different hosting repository could break with this change.