Can install4j update the xml files in the .war or .jar during 'Installer->Installation'?

跟風遠走 提交于 2019-12-11 09:14:16

问题


This question is in regards to install4j 4.2.8.

We can get the users' information from their input. It's easy to update the xml files with users' input.

But is it possile to replace the xml files in the war/jar file with above modified xml files during installation? Is there any action can do this job?


回答1:


You would have to extract the WAR file to a temporary directory with a "Extract ZIP file" action, run the "Replace text in XML files" action on the XML file and use a "Create a ZIP" file action to overwrite the original WAR file.


Update for install4j 6.1+

Since install4j 6.1, there is a "Modify ZIP file" action that can modify files inside a ZIP file.



来源:https://stackoverflow.com/questions/16410396/can-install4j-update-the-xml-files-in-the-war-or-jar-during-installer-instal

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