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-plugin
can re-sign existing jars using it'sremoveExistingSignatures
config element. So simple!I use
maven-dependency-plugin
to copy artifacts into a .war project in thegenerate-resources
phase, then sign them in theprocess-resources
phase.