在“安装程序->安装"过程中,install4j可以更新.war或.jar中的xml文件吗? [英] Can install4j update the xml files in the .war or .jar during 'Installer->Installation'?

查看:43
本文介绍了在“安装程序->安装"过程中,install4j可以更新.war或.jar中的xml文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题与install4j 4.2.8有关.

This question is in regards to install4j 4.2.8.

我们可以从他们的输入中获取用户的信息. 使用用户的输入来更新xml文件很容易.

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

但是在安装过程中是否可以用上面修改过的xml文件替换war/jar文件中的xml文件? 有什么动作可以做到这一点?

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?

推荐答案

您必须通过提取ZIP文件"操作将WAR文件提取到临时目录,然后在XML文件,并使用创建ZIP"文件操作来覆盖原始WAR文件.

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.

更新install4j 6.1 +

从install4j 6.1开始,有一个修改ZIP文件"操作可以修改ZIP文件中的文件.

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

这篇关于在“安装程序->安装"过程中,install4j可以更新.war或.jar中的xml文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆