I'm using the izpack-maven-plugin to create an installer with some
packs that use the 'loose' attribute. Here are the relavent snippets
from my pom.xml and install.xml files:
<!-- maven properties -->
<javadoc.file.name>apidocs.zip</javadoc.file.name>
<configuration.guide.name>configuration.pdf</
configuration.guide.name>
<packs.folder>packs</packs.folder>
<izpack-standalone.version>4.3.2</izpack-standalone.version>
<!-- rest of the pom stuff here -->
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>1.0-alpha-5</version>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</
artifactId>
<version>${izpack-standalone.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>standard-installer</id>
<phase>deploy</phase>
<goals>
<goal>izpack</goal>
</goals>
<configuration>
<descriptor>${basedir}/src/izpack/
install.xml</descriptor>
<descriptorEncoding>utf-8</
descriptorEncoding>
<izpackBasedir>${staging.dir}</
izpackBasedir>
<customPanelDirectory>${staging.dir}</
customPanelDirectory>
<installerFile>${project.build.directory}/$
{installer.name}.jar</installerFile>
</configuration>
</execution>
<!-- install.xml packs description -->
<packs>
<pack name="License" required="yes">
<description>The license files</description>
<file src="README.TXT" targetdir="$INSTALL_PATH" />
<file src="LICENSE.TXT" targetdir="$INSTALL_PATH" />
</pack>
<pack id="doc" name="Documentation" required="no" loose="true">
<description>The documentation for ${application.name} </
description>
<file src="${packs.folder}/${javadoc.file.name}"
targetdir="$INSTALL_PATH/docs" unpack="true"/>
<file src="${packs.folder}/${configuration.guide.name}"
targetdir="$INSTALL_PATH/docs" />
</pack>
</packs>
<!-- rest of install.xml here -->
During installation here is what my directory structure looks like:
Downloads
|__ Installer.jar
|__ packs
|__apidocs.zip
|__configuration.pdf
I execute the installer from Downloads directory using java -jar
Installer.jar
But the installer fails with a NullPointerException with the following
message:
java.lang.NullPointerException
at java.io.File.<init>(File.java:305)
at com.izforge.izpack.installer.Unpacker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:680)
From the Javadocs, it looks like an issue with the 'relative path', so
I tried various combinations of the execution directory and packs
directory to no avail! It works perfectly when set - loose="false"
Can anyone please point me in the right direction and tell me what I
am missing here?
Thanks in advance,
Safy
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email