install4j 6.0.4 - 无法创建ZIP文件

时间:2016-04-06 10:37:58

标签: zip install4j

我正在使用install4j 6.0.4,我需要更新一个WAR文件的内容。关于this answer,我将以下操作配置为“安装”屏幕的一部分:

  1. ExtractZipFileAction - 按预期工作,正确解压缩
  2. ModifyTextFileAction - 按预期工作,文件内容已更改
  3. CreateZipFileAction - 未创建新WAR文件且下一步操作失败
  4. 但是所有这三个操作都在日志文件中标记为成功:

    [INFO] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 13956]: Execute action
           Property mode: 666
           Property dirMode: 777
           Property zipFile: myApplication.war
           Property showProgress: false
           Property fileFilter: null
           Property destinationDirectory: temp_war
           Property rollbackSupported: true
           Execute action successful after 30363 ms
    [INFO] com.install4j.runtime.beans.actions.text.ModifyTextFileAction [ID 12713]: Execute action
           Property searchValue: mySomething1
           Property logReplacement: true
           Property replaceValue: mySomething2
           Property encoding: null
           Property escapeForPropertyFile: false
           Property failIfNoReplacement: true
           Property files: [temp_war\myFile.txt]
           Property rollbackSupported: true
           Backing up C:\Program Files\MyApplication\temp_war\myFile.txt
           Execute action successful after 16 ms
    [INFO] com.install4j.runtime.beans.actions.files.CreateZipFileAction [ID 13957]: Execute action
           Property zipFile: myApplication-new.war
           Property recursive: true
           Property addTopLevelDirectoriesToRelativePath: true
           Property showFileNames: true
           Property showProgress: true
           Property files: [temp_war, myAnotherFile.txt]
           Property fileFilter: null
           Property directoryFilter: null
           Property rollbackSupported: true
           Execute action successful after 16721 ms
    [INFO] com.install4j.runtime.beans.screens.InstallationScreen [ID 8]: Rollback barrier reached
           command: move 1 screens, executing actions, checking condition
    [INFO] com.install4j.runtime.beans.actions.files.MoveFileAction [ID 5318]: Execute action
       Property shared: false
       Property destinationFile: myDestinationFolder
       Property mode: 644
       Property uninstallMode: Always
       Property overwriteMode: Always
       Property directoryMode: 755
       Property triggerReboot: false
       Property recursive: true
       Property delay: false
       Property showProgress: true
       Property showFileNames: false
       Property directoryFilter: null
       Property files: [myApplication-new.war]
       Property fileFilter: null
       Property rollbackSupported: true
       The file "C:\Program Files\MyApplication\myApplication-new.war" does not exist
    [ERROR] com.install4j.runtime.beans.actions.files.MoveFileAction [ID 5318]: Execute action not successful after 0 ms
    

    另外,我无法更新现有的WAR文件。我在CreateZipFileAction的属性'zipFile'中指定了它,此操作再次标记为成功但WAR文件未更新。

1 个答案:

答案 0 :(得分:1)

我建议更新到install4j 6.1,它有一个“修改ZIP文件”动作,这使得这更容易。