-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid description in published POM #706
Comments
FWIW PomChecker may be used to validate poms before publication https://kordamp.org/pomchecker/pomchecker-gradle-plugin/index.html |
@aalmiray It would be great if you can integrate kordamp/jreleaser when you have time. |
I was able to make a quick-fix but there's something wrong under the hood. By default without any configuration, 2 publications are created, for example for The pom failing validation is <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.asciidoctor.base</groupId>
<artifactId>org.asciidoctor.base.gradle.plugin</artifactId>
<version>4.0.1</version>
<packaging>pom</packaging>
<name>Asciidoctor Base Plugin</name>
<description>.</description>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-gradle-base</artifactId>
<version>4.0.1</version>
</dependency>
</dependencies>
</project>
The quickfix is to override publishing {
publications {
pluginMaven(MavenPublication) {
pom.withXml {
asNode().children().last() + project.ext.pomConfig
asNode().appendNode('description', project.project_description)
}
}
}
} |
I won't be Grolifant as it contains no code related to POM management. |
PluginMarker comes from Gradle's plugin publish plugin which does not care about additional POM properties at all. I wouldn't push much into this as proper POM elements make sense when publishing to Maven Central but not to the Gradle Plugin Portal. |
Description of deployed POMs has a dot in the description
<description>.</description>
instead of the actual one.As per #702 (comment)
We should anyway rather refactor that pomXml code to be done in buildSrc rather than in
publishing.gradle
. It should also be easy to make it conditional to only be done when the maven-publish plugin is applied in the build.Conversation started in #702 (comment)
The text was updated successfully, but these errors were encountered: