ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Fedotov <mikh...@kittown.com>
Subject Re: Task adapter
Date Tue, 16 May 2006 13:28:39 GMT
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.

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.

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...

Thanks,
Mikhail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message