I'm using maven-jarsigner-plugin to sign a shaded uber-jar of mine. I do need to distribute some dependencies in their own jars though, and want to take those jars from a Maven repo, clear them of any existing signatures, and sign them with my own certificate.
Are there any Maven plugins that do this, or would i involve some Ant plugin hackery?
Turns out
maven-jarsigner-plugincan re-sign existing jars using it'sremoveExistingSignaturesconfig element. So simple!I use
maven-dependency-pluginto copy artifacts into a .war project in thegenerate-resourcesphase, then sign them in theprocess-resourcesphase.