# Signing mit new maven-publish

**URL:** <https://discuss.gradle.org/t/signing-mit-new-maven-publish/21254>\
**Category:** Help/Discuss\
**Created:** [January 21, 2017, 8:30am UTC](https://discuss.gradle.org/t/signing-mit-new-maven-publish/21254 "2017-01-21T08:30:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpreussler](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/dpreussler/32/5872_2.png) [@dpreussler](https://discuss.gradle.org/u/dpreussler)\
**Post date:** [January 21, 2017, 8:30am UTC](https://discuss.gradle.org/t/signing-mit-new-maven-publish/21254/1 "2017-01-21T08:30:28Z")

</div>

Hi, I could not figure out how to sign the POM as needed to upload to sonatype  
when using the new maven-publish  
[https://docs.gradle.org/current/userguide/publishing\_maven.html#sec:modifying\_the\_generated\_pom](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom)

as the signing plugin is mentioning the old upload task:  
[https://docs.gradle.org/current/userguide/signing\_plugin.html](https://docs.gradle.org/current/userguide/signing_plugin.html)

uploadArchives {  
repositories {  
mavenDeployer {  
beforeDeployment { MavenDeployment deployment -\> signing.signPom(deployment) }  
}  
}  
}

can you point me to right direction how to hook into upload to sign the pom?  
Here the build.gradle:

> <https://github.com/dpreussler/gradle-pullrequest-builder/blob/56f4c8630ff32fc4432aa563b4e7dc218de23f78/build.gradle>
