A quick experiment with Ant 1.6.5 suggests that this doesn't work with
<antcall>. e.g. in the below
<antcall target="A">
TaskB...
</antcall>
<target name="A">
TaskA
</target>
wouldn't work, since the <antcall> results in a different Project
object. Is there a workaround in this scenario ?
Brian
[EMAIL PROTECTED] wrote:
Store your Stack as reference on the project
TaskA {
public static final String STACKNAME = "someprefix.stack";
Stack stack;
public execute() {
...
getProject().addReference(STACKNAME, stack);
}
}
TaskB {
public execute() {
Stack stack = (Stack)getProject().getReference(TaskA.STACKNAME);
...
}
}
Jan
________________________________
Von: Farhdine Boutzakhti [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 24. Januar 2007 16:41
An: [EMAIL PROTECTED]; [email protected]
Betreff: Passing data between 2 created tasks
Hi list,
I am creating 2 different tasks with ANT:
A - One extracting some data in a stack from a cache,
B - One inserting these data in a database.
I want to know if there is a way to pass an object (i.e. a
stack) from A to B?
Thanks !
Farhdine.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd brian @ oopsconsultancy.com
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]