Open jpkrohling opened 6 years ago
Thank you for reporting this one! I will work on a fix later on today..
I'm currently working on it and will send a PR soon.
Unfortunately, it seems that it's more complicated than I initially thought, as the POM customizer belongs to the Shipkit plugin but the licenses information is stored in the Bintray plugin. I'll let the experts fix then :)
@epeee, would you be able to provide some insight on the best way to solve this? As this is probably a blocker for us to use it, I'd be willing to give it a shot at fixing it, in case you don't have the time to fix it.
@jpkrohling I already thought about how to fix it and it looks like I will be able to spend some time on this one tomorrow. Sounds good?
Sounds good to me :)
Hey guys! I little bit late to the game due to my knee surgery.
@jpkrohling, I've opened a pull request in our example project to demonstrate how you can customize the pom. In general, Shipkit is a set of plugins on top of standard Gradle plugins. You should be able to override any customizations that Shipkit does. We are here to help figuring it out. Check out this PR for complete file: https://github.com/mockito/shipkit-example/pull/198/files
The most important part:
//shipkit.gradle file:
plugins.withId("org.shipkit.java-publish") {
publishing.publications.javaLibrary.pom.withXml {
//refer to Groovy xml Node reference for more info how to manipulate xml
asNode().licenses.replaceNode {
licenses {
license {
name "Eclipse Public License v2.0"
url "http://www.eclipse.org/legal/epl-v20.html"
}
}
}
}
}
Let us know if it works for you!
It looks like it does work, thanks!
I just realized that no matter what I add as
bintray/pkg/licenses
, I always end up with MIT as license in the generated POM:https://github.com/opentracing-contrib/java-interceptors/blob/v0.0.3/gradle/shipkit.gradle#L22
https://dl.bintray.com/opentracing/maven/io/opentracing/contrib/opentracing-interceptors/0.0.3/opentracing-interceptors-0.0.3.pom
This seems to be the relevant code: https://github.com/mockito/shipkit/blob/98b9ff160ff73bf681b72baa6cad6ad99c8822ed/subprojects/shipkit/src/main/groovy/org/shipkit/internal/gradle/util/PomCustomizer.java#L79