Home > Blockchain >  How to do Simple Operation with IZPack
How to do Simple Operation with IZPack

Time:08-29

I use izpack-maven-plugin for my installation. Since we changed a lots of thing in our new version I wish to add those simple task.

-Copy File (Not from the stagging directory to the install directory but from the install directory to a backup folder for the customer) -Delete File (Deleting file that are no longer needed in the install directory to keep the installation of the customer clean)

I searched and tried a couple thing, nothing seem to work. Look like i can't do those operation "out of the box" in the install.xml So i tried to use the processPanel to execute either a .sh (Unix) or .bat(Windows) to do those task. Unfortunately when IzPack copy those file they don't have the executable permission, so the installation crash with a "Permission Denied" error.

I'm running out of idea to fix my problem. Thanks a lots for your time

CodePudding user response:

You need to use the executable tag in your pack definition to mark files as executable:

<packs>
  <pack ...>
    <executable targetfile="$INSTALL_PATH/bin/startup.sh"
      keep="true" stage="never" />
    ...

See the izpack documentation in chapter The Packs Element <packs> under section <executable> - mark file executable or execute it.

  • Related