We need you!

Icon

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

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

It is a good idea to collect your files and assets into the Maven project where your POM file resides.

Bearing in mind that a maven clean command will delete the target folder, we will not put anything there that we want preserved.

You are free to put things in any structure that you want but we make the fillowing suggestion.

We will put our files that we want included in a src folder tree.

Under src, we will create a main sub-folder and under that will create a izPack folder which will be the root of the files for the installation.

Code Block
titleFile Layout
languagenone
MyInstallProject
-src
  -main
    -izPack
-target
 pom.xml 

Install.xml

You need to create an install.xml file that describes how you want your installation package to be built. We will discuss the content of this file in great detail later on.

For now we can create the initial <installation> entry to get started

Code Block
titleFile Layout
languagehtml/xml
<installation version="5.0">
</installation>

This gives us the following folder structure.

Code Block
titleFile Layout
languagenone
MyInstallProject
-src
  -main
    -izPack
      install.xml
 -target
 pom.xml 

Other resources

Under the scr/main/izPack, you can create folders to hold the various files that you want to include in your installation.

These might include:

  • legal for licenses
  • doc for documentation
  • images for splash pages and other bitmap images
  • about for product descriptions
Code Block
titleFile Layout
languagenone
MyInstallProject
-src
  -main
    -izPack
      -about
         productDescription.txt
      -doc 
        cheatsheet.pdf
        manual.pdf
      -images
        splash.png
      -legal
        license.txt
      install.xml
 -target
 pom.xml 

Base directory Variable

In order to make life easier when these file locations need to be specified in the install.xml, we can befine a variable RESOURCEROOT that will point to the src/main/izPack folder

Code Block
titleFile Layout
languagehtml/xml
<installation version="5.0">
  <variables>
    <variable name="RESOURCEROOT" value="src/main/izPack"/>
  </variables>
 </installation>

We will discuss variables in more detail in the Variables Section.

Another, more Maven-centric approach is pulling in the base directory (and other useful values) directly from a Maven property defined in the POM and accessing them by expressions of kind @{property.key} in install.xml, as described in Properties.