Sign a JAR automatically when building from Netbeans

不想你离开。 提交于 2019-11-30 03:55:35

问题


I want to know if Netbeans has some option or setting that will allow me to automatically sign a jar as part of the build.


回答1:


In your -post-jar ant target, it may be convenient to read the <signjar> password from a file, e.g. ~/.keyconf. Give the file user-only access: e.g. 400 or 600.

<loadfile srcfile="${user.home}/.keyconf" property="keyconf"/>
<signjar alias="..." storepass="${keyconf}">
    ...
</signjar>



回答2:


You could use the maven plugin for that. Netbeans is able to open and create maven files out-of-the-box.

If you need signing for jnlp you could look into this and that explanation, which works fine in my TimeFinder project see the pom.xml.



来源:https://stackoverflow.com/questions/2520031/sign-a-jar-automatically-when-building-from-netbeans

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