Add InstallerListener to IzPack installer project with Maven

I have an IzPack installer working project configured with maven and added below to my install script install.xml in [ installation ] [ listeners ]:

<listener classname=" (company-name) .listener.InstallerListener" stage="install"/>


Unfortunately, the line seems to be ignored, and the debugger does not stop the set breakpoints in the InstallListener class. I read the documentation for InstallListener s, but this is not useful as I have a build process integrated with maven; here are the relevant parts of the pom.xml project object model:

 <properties> <izpack-standalone.version>4.3.1</izpack-standalone.version> </properties> <dependencies> <!-- izpack --> <dependency> <groupId>org.codehaus.izpack</groupId> <artifactId>izpack-standalone-compiler</artifactId> <version>${izpack-standalone.version}</version> <optional>true</optional> </dependency> </dependencies> <plugins> <!-- IzPack compiler --> <plugin> <groupId>org.codehaus.izpack</groupId> <artifactId>izpack-maven-plugin</artifactId> <version>${org.codehaus.izpack.izpack-maven-plugin.version}</version> <dependencies> <dependency> <groupId>org.codehaus.izpack</groupId> <artifactId>izpack-standalone-compiler</artifactId> <version>${izpack-standalone.version}</version> </dependency> </dependencies> <configuration> <izpackBasedir>${staging.dir}</izpackBasedir> <customPanelDirectory>${staging.dir}</customPanelDirectory> </configuration> <executions> <execution> <id>standard-installer</id> <phase>package</phase> <goals> <goal>izpack</goal> </goals> </execution> </executions> </plugin> </plugins> 

What am I missing here?


Note. The compiled installer contains the specified file of the InstallerListener class, so it is available at run time.

+8
java installer maven izpack
source share
1 answer

You must place the jar file containing your panel classes in the {customPanelDirectory}/bin/panels , where it will be automatically loaded by the izpack-maven plugin.

In the above case, this folder will be allowed to {staging.dir}/bin/panels , since you have set up <customPanelDirectory>${staging.dir}</customPanelDirectory> .

Adding it to the install.xml file will not work, as it will be allowed during installation, but not during the installerโ€™s assembly.

+1
source share

All Articles