Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can maven sign not only produced jar, but also dependencies

Tags:

maven-2

jar

sign

I managed to create main jar, copy dependencies to a single directory, the only step left is to sign all jars.

I can sign my own produced jar as a part of jar:sign, but how do i sign dependencies?

Thanks

like image 890
tevch Avatar asked May 18 '09 22:05

tevch


2 Answers

Here are a couple of options:

  1. Use the Maven ant task to run jarsigner from the JDK against all the dependencies.
  2. Use the webstart plugin which can sign all your JARs, even if you aren't using it for the purpose of JNLP-izing your app. I'm using it to actually JNLPize one app.
  3. Look at what the webstart plugin source is doing to iterate over all dependencies and sign them and start a new Maven Plugin/Mojo that does the same thing, sans JNLP.
  4. Onejar your app and its dependencies and just sign that.
like image 99
Matthew McCullough Avatar answered Oct 28 '22 13:10

Matthew McCullough


add to plug-in config <archiveDirectory>target</archiveDirectory>

like image 33
Anuradha Avatar answered Oct 28 '22 13:10

Anuradha