Hi Dave,
1/The syntax to call the value of property is ${prop.name}
So your code should look like this
<target nme ="xx" if="${autoBuild}">
2/ to execute special task if the build failed or suceeded just set the following two properties
nant.onsucces & nant.failure
The value is the name of the target that must be executed
<property name='nant.onsuccess' value='onsuccess'/>
<property name='nant.failure' value='onfailure'/>
<target name='onsuccess'>
<echo message="You win"/>
</target>
<target name='onfailure'>
<echo message="You loose"/>
</target>
Hope this helps
Yves
> -----Original Message-----
> From: Dave Adair [mailto:[EMAIL PROTECTED]]
> Sent: 25 September 2002 22:08
> To: [EMAIL PROTECTED]
> Subject: [Nant-users] Couple more questions
>
>
> 1) I'm trying to figure out how to use the "if"
> attribute. The documentation isn't very clear on the
> syntax. Basically I have a property called
> "autoBuild". If the property is set to true I want
> the target to execute. This doesn't work:
>
> <target if="autoBuild"
>
> What is the proper syntax?
>
> 2) How can I execute a target when the build fails
> only?
>
> Thanks.
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/n> ant-users
>