[izpack-users] Allow war files as well as zip files for unpack op tion

Christophe ROCHEFOLLE CROCHEFO at metaware.tm.fr
Thu Jun 14 13:06:00 CEST 2007


Hi, 

I change it in my version but I think it can be done for everyone. 

In CompilerConfig, to check if we have to unpack a file, we have the
following line:

boolean unpack = src.endsWith(".zip")  &&
true".equalsIgnoreCase(f.getAttribute("unpack"));

In my setup, I need to unpack a WAR files to be able to customize some
resource file depending of current installation, so I change it to:

boolean unpack = (src.endsWith(".zip") || src.endsWith(".war")) &&
"true".equalsIgnoreCase(f.getAttribute("unpack"));

To follow current rule, but I suggest removing the extension to test to put:

boolean unpack = "true".equalsIgnoreCase(f.getAttribute("unpack"));

It is the responsibility of the setup designer to provide a true archive
file, what do you think about it?

Kriss





More information about the izpack-users mailing list