ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Passing data between 2 created tasks
Date Wed, 24 Jan 2007 15:54:32 GMT
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:farhdine.boutzakhti@calyon.com]

	Gesendet: Mittwoch, 24. Januar 2007 16:41
	An: dev@ant.apache.org; user@ant.apache.org
	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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message