Hi , I could successfully write a custom task without using the nested elements.(without using the <innertask> in the ex. below) However I am unable to write a custom task that contains nested element. the task is : <taskdef name="mytask" classname="customtask" />
<mytask srcdir="." destdir="../build" > <innertask dir="c:\src" /> </innertask> </mytask> I need to get print(pass) the value of attribute dir in my customtask java file.
I shall be thankful if you could please write a code snippet or the steps for modifying the code when nested elements are used. Thanks, -Amol
I suggest you look at the source for the optional TelnetAnt task which has nested elements: <telnet userid="bob" password="badpass" server="localhost"> <read>/home/bob</read> <write>ls</write> <read string="/home/bob"/> </telnet> Using this task as an example, I found it relatively easy to write nested Ant elements. [ June 04, 2003: Message edited by: Jay Damon ]