We need you!

Icon

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

Skip to end of metadata
Go to start of metadata

Listeners

An IzPack listener is a Java class that can add to, or modify, IzPack functionality at various points during install, uninstall, or compile.

Using Listeners

Listeners are embedded into an installer using the <listeners> element. Any number of <listener> tags can be included for any of the three IzPack lifecycle stages.

Example

The <listener> element has the following attributes:

Attribute NameDescriptionRequired
classnameSpecifies the name of the class implementing the required listener. May be a bare class name (usually used for built-in listeners, e.g. AntActionInstallerListener) or a fully-qualified class name.Yes
stage

The lifecycle stage in which the listener should be registered. Valid values are:

  • install
  • uninstall
  • compile 
Yes
jarFor custom listeners, specifies the containing JAR file. Must be an absolute path, or relative to IZPACK_HOME.No, unless the specified class is not a built-in IzPack listener

A listener might require that additional JAR files or resources be added to the installation descriptor. See the documentation of the specific listener you intend to use. For example, the AntActionInstallerListener expects at least several jar files from Apache Ant (or more, in case of using non-standard Ant tasks), and an Ant buildfile as resource.

  • No labels