[izpack-user] Null pointer exception with loose pack

74 views
Skip to first unread message

Syf89723

unread,
Jan 5, 2011, 2:09:06 PM1/5/11
to us...@izpack.codehaus.org
Hi,

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


Syf89723

unread,
Jan 9, 2011, 5:06:23 AM1/9/11
to us...@izpack.codehaus.org
I was just wondering if any of the 'gurus' of IzPack could help with
how relative paths are resolved for 'loose' packs? My problem is still
unresolved. I'd appreciate it if any who managed to use the 'loose'
attribute successfully could post their install.xml snippet on here.
Reply all
Reply to author
Forward
0 new messages