There are all kinds of helpful hints out there :)

It really depends what you are trying to do tho. If you are going to
write a task that needs to execute a program you may want to look at and
inherit from ExternalProgramBase [1]. If you just want to do some
processing you can inherit from Task. If you want to write a task that
allows other tasks to be nested inside, inherit from TaskContainer [3].

<echo/> [2] is a really simple example of a property and the Task entry
point for doing work. 

A few general notes...

--Use code attributes ([TaskAttribute("name")]) so the framework can
read the xml attributes into your object properties.

--Add xml-document comments so your task is easy to use, and documented.

--Don't forget to call base.Method(...) first on things you override
(depending on what you are doing... may be very important in the case of
TaskContainer)


If you have the time, or inclination, a simple write-up or howto would
be great. It is always great to get many viewpoints on the development
process for more insight. :)

[1]
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/nant/nant/src/NAnt/Tasks/
ExternalProgramBase.cs?rev=1.22&content-type=text/vnd.viewcvs-markup

[2]
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/nant/nant/src/NAnt/Tasks/
EchoTask.cs?rev=1.9&content-type=text/vnd.viewcvs-markup

[3]
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/nant/nant/src/NAnt/TaskCo
ntainer.cs?rev=1.1&content-type=text/vnd.viewcvs-markup


> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:nant-developers-
> [EMAIL PROTECTED]] On Behalf Of Kevin Miller
> Sent: Wednesday, July 17, 2002 12:05 PM
> To: Nant-Developers (E-mail)
> Subject: [nant-dev] Porting java ant task to NAnt
> 
> I am currently working to port a Java task to NAnt. I am utilizing the
> NAnt
> task source to light the way for trying to see the differences.
> Anyone want to volunteer some helpful tips for the newbie NAnt task
> developer that is new to NAnt and has never used Ant?
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to