We need you!


The IzPack documentation needs work, and you are invited to edit it!

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
    <res id="AntActionsSpec.xml" src="myInstallSpecs/MyAntActionsSpec.xml" />

<jar src="jar/ant.jar" stage="both"/>
<jar src="jar/ant-launcher.jar" stage="both"/>
<jar src="jar/customtasks.jar" stage="both"/>

    <listener classname="AntActionInstallerListener" stage="install" />
    <listener classname="AntActionUninstallerListener" stage="uninstall" />


  • the AntActionsSpec.xml resource determines the Ant tasks to be executed. The base path of src is the installation project path.
  • the <jar/> element specifies jar dependencies required to execute the Ant tasks. At a minimum, this must include the Ant ant jar and ant-launcher.jar.
  • the <listeners> element is used to hook execution of the Ant tasks into the installer and uninstaller

Nor Note that an "extended" ant use needs more than one jar, for example often xercesImpl.jar. If an obscure "class not found" exception is raised during testing, check first for missing jar files.


Note that not the jar file itself, but the contents of it are required. This implies, that the paths of the contained files are unique and the information in meta-inf/Manifest.mf will be lost. The jars are merged into the installer during compile. So the attribute src is used during compile time, not installation time. The jar files are not needed during installation anymore.

The AntActionSpec XML



An ant action is defined in the resource with the id "AntActionsSpec.xml". In IzPack 5.0 (as of 5.0.0-beta-11), an XML-Schema is provided, which may be declared as follows:





Allowed Values



Determine at what point of installation the antcalls defined by element target should be performed. Be aware that with beforepack(s) there are no installed files and also no installed build file. With this order only preexistent build files are useable.

beforepack, afterpack, beforepacks or afterpacks.



Determine at what point of uninstallation the antcalls defined by element uninstall_target should be performed. As opposed to the behaviour of order the referenced files are also accessible in the order afterdeletion. The uninstaller action copies the files into tempfiles before deletion which are marked as deleteOnExit.




To quit or not.

Whether to log just warnings and errors, be quiet otherwise.
Maps to Ant log level "warning". 

yes or no, default: no



To output Whether to log verbose information or not.
Maps to Ant log level "verbose". 

yes or no, default: no


Straight Ant log priority level mapping to the according log levels in Ant projects.
The attributes verbose and quiet have higher priority, if they are used, and "win" over loglevel.
If none of the attributes, quiet, verbose nor loglevel is used, the Ant action log level default to "info".

error, warning, info, verbose, debug



Path to the file where logging should be performed. Note: The logfile should be not marked for uninstallation otherwise it will be deleted too.

Any valid file path (TODO: should verify format)

logfile_appendnoWhether to append to an existing log file (true) or create a new one / overwrite existing one (false).true | false (default: false)


yes, if buildresource not specified

Path to the file which contains the antcall. This is the file you normally use as -buildfile during an ant call via the command line. Variables are not substituted in this file. Variables should be set using ANT properties. Note: Never write an IzPack variable in an ant buildfile.

Any valid file path (TODO: should verify format)


yes, if buildfile not specified

The value is the id of the resource which contains the antcall. This resource will be extracted out into a temporary file and the path to this file will be passed as if -buildfile were specified during the ant call via the command line. The temporary file is removed after the ant call. In this file variables are not substituted. For substitution there are properties in ant which can be used. Note: Never write an IzPack variable in an ant buildfile.

A resource id.

dirnoThe working directory for executing the Ant build in buildfile or buildresource. If set, it explicitly overrides the basedir set there and serves as base directory for relative path names accessed during the Ant build.Any valid directory path



If it is defined, the message will be displayed in the InstallPanel whilst performing the ant call.

A string ID which refers to bin/langpacks/installer/<lang>.xml.

conditionnoExecute this action only if the condition is fulfilled.A valid condition string.

The severity of an Ant action:

  • error: The installation fails and aborts, an error messagebox with the failure message from Ant is displayed
  • warning: The installation doesn't fail and continues, a warning messagebox with the failure message from Ant is displayed
  • info: The installation doesn't fail and continues, an info messagebox with the failure message from Ant is displayed

since: 5.0 RC5

error | warning | info (default: error)

In addition to the possible attributes there are some elements may be defined within an antcall element. All elements can be defined zero or more times in an <antcall>. Although all elements are optional, no ANT tasks will be performed unless a <target> element is specified. Do not confuse the following: "required"s are related to the attributes of the elements, not to the elements themselfs.