Developers, Developers, Developers! Maksim Sorokin IT Blog


IzPack with Maven

What does Maven? Maven builds a project. What does IzPack? IzPack builds an installer. Naturally, one would like to use Maven to control IzPack. Here is an example of a simple application which uses Maven and IzPack to create an installer for an application.

We start by creating a pom.xml:

<project xmlns="" xmlns:xsi=""

  <name>Test IzPack and maven</name>


      <!-- Used to configure IzPack installer -->


Provided Maven packaging is pom since we don't want to produce any application jars. IzPack will create a executable jar file by itself.
And we are using two plugings. One is Maven IzPack plugin. And another one is used to copy installation files to the "staging" directory. Staging directory it is where all needed resources are copied. Executable jar will be created from it afterwards.

And then in the src/main/resources we create a install.xml configuration file which configures our installation:

<?xml version="1.0" encoding="UTF-8"?>

<installation version="1.0">

    <appname>Test Installer</appname>
    <uninstaller write="no" />

    <pack200 />

  <guiprefs resizable="no" width="480" height="360">
    <laf name="looks">
      <param name="variant" value="windows" />
      <os family="windows" />

    <langpack iso3="eng" />

    <panel classname="HelloPanel" />
    <panel classname="SimpleFinishPanel" />

    <pack name="main" required="yes">
      <description>Test Installation</description>


All the detailed about this install.xml configuration file can be found on IzPack documentation page.

And now we are ready to go. Run mvn install and in target folder you will find an installer! It will consist of two panels -- Hello Panel and Finish Panel. Nothing fancy. But you have to start somewhere!

Comments (7) Trackbacks (3)
  1. Great you hit the spot for me :) Keep the posts comming :)

  2. How do you add shortcuts?

  3. Hi, Dan! Thanks for your comment.

    Take a look to a Desktop Shortcuts section in official IzPack documentation

  4. Just FYI, the install.xml has to be at src/main/izpack, NOT src/main/resources. Not sure what version this is of.

  5. My previous comment was wrong, but I believe there is a typo in the above POM: the section has to be inside the level, not the :





  6. KP, install.xml is in src/main/resources because we do some “staging” before running IzPack compiler. That is, replace ${…} inside install resources and sometimes do additional stuff.

    Actually, everything should be fine with sections and nestings. This is copy-paste from real application.

  7. If I have some of install.xml files at different directories and resource downloading is not needed, what should I do?

Leave a comment