ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Fedotov <>
Subject Re: Task adapter
Date Tue, 16 May 2006 14:12:53 GMT
Steve Loughran wrote:
>> I need an alternative to standard copy task . The standard one does 
>> not preserve permissions on unix systems, can not be told to create 
>> hardlinks if possible instead of copying,
>> etc etc, and I need all that. I'm planning to get standard copy task 
>> and modify it to produce system-dependent script (for windows and for 
>> linux) and then pass the script to shellscript
>> task from ant-contrib.
> windows? permissions? Cygwin or real NTFS metadata + ACLs?
No, we don't need that. On windows all additional functionality is 
turned off, but on linux/*nix it is strictly mandatory. We already have 
some spaghetti-style version of such copy task.
The code essentially repeats the whole shellscript task, exec task, and 
Execute class used by them... I'm redesigning it into something more 
>> The problem is that I have a lot of filesets, and each of them must 
>> be copied to its own directory. This way I'm getting a lot of 
>> instances of modified copy task,
>> which in turn create many instances of shellscipt task, which do a 
>> lot of shell/system calls. This last bit makes the whole system very 
>> fragile, according to our experience.
> slow too. you are execing a lot.
I can group such copy requests into reasonable number of scripts. This 
is already done, but in a very ugly way.  The problem seems to disappear 
when hundreds of "cp"s
are run from the shell started from Java instead of being run directly 
from Java via individual system calls.
> otherwise, I'd try creating a good cp -r command, possibly with <apply>.
We tried that (without "-r"), it does not work, some jvms tend to 
produce core dumps when they see a lot of "cp"s. We need to run ok even 
on those. And we can't
use "-r" as we need to exclude some stuff...

Thanks for ideas, I'll try to extend FileSet and use hacked version of 
copy procedure.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message