[BUG] Custom POM configuration for ZIP publication produces duplicit tags (url, scm) #3649
Labels
bug
Something isn't working
Build Libraries & Interfaces
v2.0.0
Version 2.0.0
v2.1.0
Issues and PRs related to version 2.1.0
v3.0.0
Issues and PRs related to version 3.0.0
Describe the bug
As an plugin author I want to configure top level POM values for project
<url>
and<scm>
tags.But the generated POM file contains duplicated tags, one with the custom value and second with
unknown
value.This also leads to the following validation error:
To Reproduce
The following is the publishing task configuration in my plugin
build.gradle
:And the following is generated POM.xml file:
Both the
<url>
and<scm>
tags are duplicated, and they contain valueunknown
in one case.Expected behavior
A valid POM file with correct values in
<url>
and<scm>
tags.Plugins
Screenshots
N/A
Host/Environment (please complete the following information):
Additional context
When
url
andscm
tags are left out of publishing task configuration (which seems to be the case of all examples that I found) then still these tags are generated and added into POM with valueunknown
. As far as I understand this is because maven repository can have specific validation rules setup and presence of specific tags is required. Hence a hard-coded set of validation rules was implemented as part ofPomValidationTask.checkPom()
to fulfil requirements of maven central. Currently, it would be problematic for plugin authors to publish artifacts to repository if it enforces different set of validation rules.Possible related tickets:
The text was updated successfully, but these errors were encountered: