Matt Greer wrote:

<if test="${not property::exists('myProp')}">
  <echo>error message</echo>
<!-- *** just exit the script, don't throw a build exception, no error codes, just exit and return 0 *** -->
  <exit/>
</if>

Invert the sense of the test, and use either the <nant> or <call> tasks to proceed. For example, you could just add a wrapper script that you invoke from the command line, and it might contain:

   <if test="${property::exists('myProp')}">
      <nant buildfile="TheRealBuildFile.build"
               target="${nant::get-current-target()}" />
    <fi>

or something similar. I don't use the get-current-target function, so I'm don't know if does exactly what you want, but it's close.

Gary



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to