BAT-files (yup – you heard right!) to sign an entire update site

Digitally signing an Eclipse update after the fact (i.e. it’s not part of the build) can be tedious and time consuming. To make the process easier I wrote two small BAT-files that does the recursive signing of all plugin and feature JAR-files for you. Just stick the two BAT-files (signall.bat and dosign.bat) in the root Eclipse update site directory (together with site.xml) and invoke signall.bat.

Syntax
signall.bat <keystore path> <keystore password> <certificate alias from keystore>

Example
signall.bat mykeystore changeit signer_key

signall.bat

@echo off
set jdkhome=%JAVA_HOME%
for /f %%a IN ('dir /b /s *.jar') do call dosign.bat %1 %2 %3 %%a
set jdkhome=

dosign.bat

@echo off
echo Signing: %4
%jdkhome%binjarsigner.exe -keystore %1 -storepass %2 %4 %3

2 thoughts on “BAT-files (yup – you heard right!) to sign an entire update site”

  1. I did not think about using a bat (cmd) file.

    but this is really an important little tool to have.

    everyone who has tried to sign 3rd party plugins will appreciate this little tool.

    you could add checking for the return code of the jarsigner to ensure that you get the status of all signing operation if you feature has many jar files.

    Like

Comments are closed.