ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya A. Kriveshko" <>
Subject Patch for optional Cab task.
Date Thu, 15 Nov 2001 19:29:53 GMT
Could someone qualified to make changes to CVS please apply the attached 

Here is the background.

I tried to use cab task on Linux (with libcabinet), and ran into two 
1) Task executed, but no cab file was created
2) No diagnostic information (error messages, error code, etc.) were 

After investigation, it appeared that "listcab" was executed in the 
wrong directory - it did not respect the "basedir" attribute. Therefore, 
listcab could not find the files it needed to archive. Also, the return 
code of  the exec was not checked, and the output was not piped through 
to the parent process. This might have not bothered the author (and 
other users), because the basedir might have defaulted to the build's 
top-level directory.

The enclosed patch fixes both problems:
1) calling Runtime.getRuntime().exec("listcab", null, baseDir);
2) by asynchronously gobbling listcab's output and error, and displaying 
the result in case an error occurred

The file uses different coding styles (for example, opening 
curly brace placment) in different regions, so I tried to adhere to the 
style of the region that I was working on. Hope I didn't offent anyone.

Module: jakarta-ant
File: src/main/org/apache/tools/ant/taskdefs/optional/

Please, e-mail me if someone actually applies this patch.

P.S.: It's a superb tool you've made, guys. I am using XSL/T to 
automatically generate buildfiles. Works like a song!

View raw message