ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ultra Funkular <funku...@nettaxi.com>
Subject Re: Using Ant api to call a task...
Date Tue, 18 Jun 2002 15:05:40 GMT

My task reference is null after making the change from
	AntStructure task = new AntStructure();
	task.setProject(project);
   to
	AntStructure task =(AntStructure) 
project.createTask("antstructure");

Why is this?   The former implementation did work.
Perhaps "antstructure" is not recognised?  I also tried "AntStructre".
Note: The Project Javadoc does not specify the return type in this 
scenario.


T Master.




On Tue, 18 Jun 2002 00:11:49 Stefan Bodewig wrote:
> On Mon, 17 Jun 2002, Hal Hildebrand <Hal.Hildebrand@hellblazer.com>
> wrote:
> 
> >         ExecTask exec = new ExecTask();
> >         exec.setProject(project);
> 
> The preferred way would be
> 
>     ExecTask exec = (ExecTask) project.createTask("exec");
> 
> Stefan

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


Mime
View raw message