[izpack-devel] [Patch] No chmod on JAR type

Andreas Guenther aguenther at mulesource.com
Thu Sep 20 00:47:09 CEST 2007


Hi there,

Since there's no bug tracking system I followed the instrx on sending my 
patch to the dev list as requested. Here goes.

I needed to resolve classpath dependencies while executing Java code 
during post processing using the <executable> tag. Right now, the 
targetfile attribute only can handle a single jar file. Looking at the 
trace output I realized that targetfile ultimately resolves into a '-cp' 
option. Hence, I tried specifying more jars in classpath fashion in 
targetfile. Here's an example:

<executable 
targetfile="$INSTALL_PATH/lib/foo.jar:$INSTALL_PATH/lib/bar.jar" 
class="org.foo.Bar" failure="abort" type="jar" stage="postinstall" 
keep="true"/>

Unfortunately, this didn't work because the code tries to run chmod on 
targetfile after processing. I changed the code so that chmod only 
applies and executes when type is set to bin. Now I am able to resolve 
my Java execution dependencies and can use targetfile as a classpath 
variable.

Please see my attached patch. I was hoping you guys are going to commit 
it to trunk for an upcoming release. Certainly, if there's a better to 
run Java code with multiple classpath entries I'd like to hear about it ;o)

Cheers,
-Andreas


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: FileExecutor.java.no-chmod-on-jar-type-patch.txt
Url: https://lists.berlios.de/pipermail/izpack-devel/attachments/20070919/fc56e4d7/attachment.txt 


More information about the izpack-devel mailing list