Re: Task adapter

2006-05-16 Thread Mikhail Fedotov
Steve Loughran wrote: or you cp -r to some intermediate place, strip out the junk you dont want then do another cp -r of the stuff you like. Nasty, but roughly what I do with some of my deployments where I want almost but not everything on the classpath to get redistributed. Rather than decla

Re: Task adapter

2006-05-16 Thread Steve Loughran
Mikhail Fedotov wrote: . otherwise, I'd try creating a good cp -r command, possibly with . 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.

Re: Task adapter

2006-05-16 Thread Mikhail Fedotov
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 s

Re: Task adapter

2006-05-16 Thread Steve Loughran
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 a

AW: Task adapter

2006-05-16 Thread Jan.Materne
>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 sys

Re: Task adapter

2006-05-16 Thread Mikhail Fedotov
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(Ta

AW: AW: AW: Task adapter

2006-05-16 Thread Jan.Materne
>what happens when mytask2 calls log() in its execute method if you >*dont* call setProject(0 I would expect a NPE :-) That`s the binding would help, but AFAIK Ant does not do this automatically. (Only for ProjectComponents that are ed.) Jan

Re: AW: AW: Task adapter

2006-05-16 Thread Steve Loughran
[EMAIL PROTECTED] wrote: If you call the tasks methods directly it behaves just a normal java class. Ant doesnt do any dependency injection ... It does one, setProject(). Mmh - really? MyTask1 extends Task { MyTask2 t = new MyTask2(); // t.getProject() ??? } MyTask2 ex

AW: AW: Task adapter

2006-05-16 Thread Jan.Materne
>> If you call the tasks methods directly it behaves just a normal java >> class. >> Ant doesnt do any dependency injection ... > >It does one, setProject(). Mmh - really? MyTask1 extends Task { MyTask2 t = new MyTask2(); // t.getProject() ??? } MyTask2 extends Task {} Jan -

Re: AW: Task adapter

2006-05-16 Thread Steve Loughran
[EMAIL PROTECTED] wrote: I have two existing tasks. I want to modify the first task so that it runs the second one as part of its work. I have code which creates ant build file with parameters for the second task and then uses new instance of AntScenario to run that file. The question is, can

Re: Task adapter

2006-05-16 Thread Steve Loughran
Mikhail Fedotov wrote: Hi all, I have two existing tasks. I want to modify the first task so that it runs the second one as part of its work. I have code which creates ant build file with parameters for the second task and then uses new instance of AntScenario to run that file. The question

AW: Task adapter

2006-05-16 Thread Jan.Materne
>I have two existing tasks. I want to modify the first task so >that it runs the second one as part of its work. > >I have code which creates ant build file with parameters for >the second task and then uses new instance of AntScenario to >run that file. The question is, can I do the same thing

Task adapter

2006-05-16 Thread Mikhail Fedotov
Hi all, I have two existing tasks. I want to modify the first task so that it runs the second one as part of its work. I have code which creates ant build file with parameters for the second task and then uses new instance of AntScenario to run that file. The question is, can I do the same t