How to speedup jar signer?

拥有回忆 提交于 2019-12-21 12:54:26

问题


I use ant for sign my jars for web-start deployment. Ant.signjar is very slow when web-start signing. How to speedup signing process ?


回答1:


I found one possible solution.

Earlier in build script ant.signjar called sequentially for all jars (We use gradle for build, more than 20 MB dependecies). Now i use groovy library GPars methods: withPool(4) and eachParallel { ant.signjar }. It is cool for 2 cores in my pc and 4 cores in build server. (for 3 times faster)

Second trick is cache: we use cached signed jars for all RELEASE/NON-SNAPSHOT dependencies. When we run build without clean, it runs faster because uses cached signed libs from build directory.




回答2:


I generally use 2 targets: one to sign the whole project and one to only sign my jars. So the latter will not re-sign dependencies and make the signing process much quicker.



来源:https://stackoverflow.com/questions/14438831/how-to-speedup-jar-signer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!