ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Task adapter
Date Tue, 16 May 2006 13:42:06 GMT
Mikhail Fedotov wrote:
> Steve Loughran wrote:
>> The alternative is creating and binding by hand:
>> MyTask task=new MyTask();
>> task.setProject(getProject());
>> task.setName(getName());
>> task.setLocation(getLocation());
>> task.init();
>> This is how everything in Ant1.7 does it, though there we cheated add 
>> added Task.bindToOwner(Task owner) to do the repetitive work of 
>> propagating project, name and location.
> Thanks! I'll use that.
> A bit more info about that I'm doing.
> 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?

> 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 think that the best option would be to subclass FileSet and add target 
> directory attribute to it. But maybe someone here has a better idea or 
> some other hint...

Java 6.0? Maybe there is also some stuff in sourceforge to do filesystem 
permissions. If not, you could write one.

otherwise, I'd try creating a good cp -r command, possibly with <apply>.


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

View raw message