When using a standalone-compiler.jar located in a path that contains spaces the lookup of izpack home fails. This scenario is quite common when using maven on windows. I could not get it to work by setting the home explicitly (eg -DIZPACK_HOME=. or -h . )
C:\tmp>java -cp "C:\Documents and Settings\theuser\.m2\repository\izpack\standalone-compiler\3.11.0\standalone-compiler-3.11.0.jar" com.izforge.izpack.compiler.Compiler install-definition.xml
.:: IzPack - Version 3.11.0 ::.
< compiler specifications version: 1.0 >
- Copyright (c) 2001-2008 Julien Ponge
- Visit http://izpack.org/
for the latest releases
- Released under the terms of the Apache Software License version 2.0.
-> Fatal error :
No valid IzPack home directory found
java.lang.IllegalArgumentException: No valid IzPack home directory found
at com.izforge.izpack.compiler.CompilerConfig.resolveIzPackHome(Compiler
Config.java:2283)
at com.izforge.izpack.compiler.CompilerConfig.main(CompilerConfig.java:2
210)
at com.izforge.izpack.compiler.Compiler.main(Compiler.java:709)
(tip : use -? to get the commmand line parameters)
The problem is that the jar-file has a version number at the end of the name. The code checks for exact match on "standalone-compiler.jar", which doesnt work with maven style version numbers.
It was a bit confusing to debug since the code loops and checks parentFile(); so if the jar file resides somewhere inside a valid IZPACK_HOME a home-dir will eventually be found (although not the expected one).
BTW, the problem exist on trunk as well.