According to issue #5808 and its companion design spec document, it should be possible to customize the generated pom for the Plugin Marker.
My goal is to make it fulfill the Maven Central requirements (you need to have a name, some license, some developer…), but I did not found any information about how the groovy-dsl looks like.
I have tried:
publishing {
publications {
pluginMaven(MavenPublication) {
pom {
name = 'XXX'
}
}
mavenJava(MavenPublication) {
//... other configuration for the normal jar and pom
}
}
}
But my “pluginMaven” bloc under “publications” seems to be ignored.
I am applying these plugins to my grade build:
plugins {
id 'java-gradle-plugin'
id 'signing'
id 'maven-publish'
id 'de.marcphilipp.nexus-publish' version '0.3.0'
id 'io.codearte.nexus-staging' version '0.21.0'
}
Hello! This is exactly what I need but it doesn’t all work for me.
I’m a newbie with gradle I’m working with a build.gradle.kts file. It creates a mavenJava artifact and the plugin marker pom.
The withType block works completely for the mavenJava pom. But the Plugin Marker pom is missing project description and name. It picked up everything else from this block. I dont’ know why so I’m trying to manipulate the pom for the plugin marker itself. But my-pluginPluginMarkerMaven doesn’t resolve in my build script.
Any suggestions? What is syntax for targeting the marker pom directly in the publication block?
publishing {
afterEvaluate {
publications {
withType(MavenPublication) {
pom {
name.set(project.name)
description.set(description}
//other pom details
}
}
// this is unresolved and the build fails
my-pluginPluginMarkerMaven {
}