That is a good point. 

What I was doing was returning a build error so I could display the
project help. (Since there is no other easy way to message NAnt from
within the project.) I think I should only do this if there is no global
task defined also. 

I have backed out my change. Sorry for the confusion.

> -----Original Message-----
> From: Bernard Vander Beken
> Sent: Wednesday, April 24, 2002 4:03 AM
> To: [EMAIL PROTECTED]
> Subject: [nant-dev] RE: [nant-commits] CVS: nant/src/NAnt
> Project.cs,1.30,1.31
> 
> Scott,
> 
> Currently the NAnt unit tests fail because many use simple build files
> 1) without *any* target, and of course
> 2) without any default target.
> 
> I suggest that this type of build files is allowed to run, so no error
> message should be specified.
> 
> Regards,
> 
> Bernard
> -----Original Message-----
> From: Scott Hernandez [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: [nant-commits] CVS: nant/src/NAnt Project.cs,1.30,1.31
> 
> 
> Update of /cvsroot/nant/nant/src/NAnt
> In directory usw-pr-cvs1:/tmp/cvs-serv30530
> 
> Modified Files:
>       Project.cs
> Log Message:
> Added "No Target Specified" BuildException if there is no default
> target, or command line option specified
> 
> Index: Project.cs
> ===================================================================
> RCS file: /cvsroot/nant/nant/src/NAnt/Project.cs,v
> retrieving revision 1.30
> retrieving revision 1.31
> diff -C2 -d -r1.30 -r1.31
> *** Project.cs        23 Apr 2002 20:49:49 -0000      1.30
> --- Project.cs        23 Apr 2002 23:26:51 -0000      1.31
> ***************
> *** 267,273 ****
>               }
> 
> !             foreach(string targetName in BuildTargets) {
> !                 Execute(targetName);
> !             }
>           }
> 
> --- 267,278 ----
>               }
> 
> !                     if (BuildTargets.Count == 0) {
> !                             throw new BuildException("No Target
> Specified");
> !                     }
> !                     else {
> !                             foreach(string targetName in
> BuildTargets) {
> !                                     Execute(targetName);
> !                             }
> !                     }
>           }
> 
> ***************
> *** 279,282 ****
> --- 284,288 ----
>               target.Execute();
>           }
> +
> 
>           public Task CreateTask(XmlNode taskNode) {
> 
> 
> _______________________________________________
> nant-commits mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-commits
> 
> _______________________________________________
> Nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers


_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to