Writing custom tasks in ANT
1 posts in topic
Flat View  Flat View

Posted By:   Aarthi_Muralidharan
Posted On:   Wednesday, February 16, 2005 11:31 PM

I need to write a custom task. In my custom task(file.java) can i use ANT tasks?

Here, i want "mytask" as my custom defined task where mytask should execute another ANT target. So can i use ANT inbuilt tasks as i write my custom task?

Re: Writing custom tasks in ANT

Posted By:   Anonymous  
Posted On:   Thursday, February 17, 2005 02:48 AM

For a simple reuse of existing tasks I suggest using and .

For starting writing your own tasks in Java, read the Tutorial: Writing Tasks. Tasks itself are simple java classes and can therefore be reused in other contexts/tasks. Echo echo = (Echo)project.createTask("echo"); The createTask() method would instantiate the task and set its references. After that you could do a echo.setMessage("Hello"); echo.execute();.

About | Sitemap | Contact