Signing pom.xml with maven-publish still impossible?

I am working on replacing a Maven build with Gradle where one of the requirements is to publish to Maven Central. I thus need to sign not only the artifacts but also the pom file. I started using the maven-publish plugin as it seemed to be the reasonable choice for a new project, but now I have run into the obstacle that it seems impossible to sign the pom file with the new plugin.

I have been reading docs and googling for a while, and all answers to this problem seem rather old. I could not find any related issues in the Gradle issue database. Before I switch to the old, dying maven-plugin, I wanted to make sure that I have not misunderstood: is it still impossible to sign the pom file with the new maven-publish plugin?

As far as I know, it’s still impossible. One alternative is to publish to Maven Central via jCenter, which does the signing for you.

Thank you for your reply Peter. I find this quite unfortunate: as the old maven plugin is left dying slowly, more and more people will, like me, be trapped in an impossible situation if the new plugin is not feature complete. For me, it’s impossible right now to change my organization’s deploy routines, and go the jCenter way. This project was an attempt to show case the superiority of Gradle over Maven, but now I see no easy way forward.

I am surprised there’s not even issue on this, or was my search in the issue database incomplete?

I’ve filed GRADLE-3183. Thanks for reporting.

Does the description here still work?

Thanks for the tip, Stefan. I saw that post, and haven’t been able to try it yet. Although it seems to solve the technical problem, it’s not a very good solution for me. As I said in an earlier post, I am preparing a Gradle translation of a previous Maven build. I will not be the primary user of this Gradle script, and it will be awkward to explain to the users why they have to run Gradle twice with the same arguments, as I understand the solution in the references article requires.