Apache Ant integration

IzPack can be easily integrated inside an Ant build process.



<?xml version="1.0"?>
<project default="install">
    <path id="build.classpath">
        <fileset dir="${user.home}/IzPack">
            <include name="lib/*.jar" />
    <taskdef name="izpack" classpathref="build.classpath" classname="com.izforge.izpack.ant.IzPackTask" />

    <target name="install">
        <izpack input="install.xml"
                izPackDir="${user.home}/IzPack/" />

The above assumes that the IzPack distribution has been installed to ${user.home}/IzPack.

The IzPack task takes the following parameters:

Embedding the installation file using a config element

Instead of using the 'input' attribute to specify an external installation document, you can embed the installation config as a child of the IzPack task using a config child element with a CDATA section. For example:


<property name="jboss.home.url" value="http://www.jboss.com/" />
<!-- Call IzPack with an embedded install using the config element -->
<IzPack output="${dist.dir}/IzPack-install.jar"
<installation version="1.0">
         <author name="JBoss Inc." email="sales@jboss.com"/>


Property references of the form




are replaced by the associated x ant property if it is defined.