I'm very new to Nant, so this might be obvious, but how exactly can I do
conditional things based on the *value* of a property?

I've seen the <if> task
(http://nant.sourceforge.net/release/latest/help/tasks/if.html), and it
seems I can do just about anything except for check the value of the
property.

Towards, the bottom, there's a brief mention of the test parameter, but it
doesn't work at all for me:

<if test="${ccnet.buildcondition}='ForceBuild'">
           <property name="build" value="rebuild"/>
</if>

This complains that an if task always needs a propertyexist or some other
one. If I add propertiexists on top of test, test is ignored and the
condition of <if> appears to be always true.

I also tried doing

<property name="build" value="build"
if="${ccnet.buildcondition}='ForceBuild'"/>

but it claims that the expression in the if statement is not valid and it
doesn't know how to compare it.

This has to be really trivial. Any idea?
Thanks!


--Noel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to