May be I'm misunderstood you guys, but I'm using version 0.8.3 and the <delete> task seems clear to me. Take the following snippet for example:
<!-- Clean build environment --> <target name="clean" description="Clean build environment to prepare for new build"> <delete dir="${project.sources.dir}" failonerror="true" /> <mkdir dir="${project.sources.dir}" /> <delete> <fileset basedir="${project.build.dir}"> <includes name="**/*.log" /> </fileset> </delete> </target> And here's the result -- clean: [delete] Deleting directory D:\Builds\DSS\sources. [mkdir] Creating directory D:\Builds\DSS\sources. [delete] Deleting 0 files. -----Original Message----- From: Brett Michael [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:22 PM To: 'Nant-Users' Subject: RE: [Nant-users] Idea: <task ... message="hello world" /> I would just like to say I think this is a cool idea. Particularily if variables are expanded in these messages. Brett -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Lanoie Sent: Friday, 1 August 2003 3:42 AM To: Nant-Users; [EMAIL PROTECTED] Subject: [Nant-users] Idea: <task ... message="hello world" /> -- Part 1 -- Hi NAnters, I was just editing some build files and testing out some things. The thought occurred to me that certain tasks don't have as useful a message output as would sometimes be desired. Take the following task: <delete dir="c:\winnt" /> The typical output is: [delete] Deleting 1 directories. Wouldn't it be handy to be able to do this: <delete dir="c:\winnt" message="Deleting windows!!" /> ...and get this... [delete] Task Message: Deleting windows!! [delete] Deleting 1 directories. ...or some variation on this. Now before someone says "Just use <ECHO>!", let me point out that this would be applicable to the task itself such that it's also affected by task conditions: <delete dir="c:\winnt" message="Deleting windows!!" if="${meNotTooBright}" /> Not to mention that adding this one attribute to the task base class would be remarkably easy and thus globally available. -- Part 2 -- So I tried my hand at adding a "message" attribute to the Task class (using the 0.8.3-rc2 code) but I failed miserably. I'm not C#-enough (Get it? Sorry.) to figure out why it won't build (all kinds of reference errors which I can't seem to track down). So I figured I'd throw this up so that someone important who feels it's a good enough idea can put it in and make it actually work! Modifications to the Task base class (Task.cs): Added this var and property: string _message; /// <summary> /// Task specific message that is echoed if the task is executed. Default is blank. /// </summary> [TaskAttribute("message")] public string Message { get { return _message; } set { _message = value; } } Jammed this into public void Execute() right before ExecuteTask(); (approx line 145 in the code I had): if(_message != null){ Log(Level.Info, LogPrefix + "Task Message: " + _message); } This is only a suggestion. If someone actually DOES make this addition, feel free to make the log message show appropriately according to NAnt standards etc. Doesn't really matter to me what it looks like, just that a message is shown and obviously associated with the task. Thanks! Peter ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users