Check if property is set in phing

How to check if the property ${foo} ?

Bonus question: how do I get $ to enter <echo> so that I can print the string ${foo} (rather than substituting foo variables)?

PS: I tried Google and read the documentation, but could not find the answers. I probably missed something.

+8
phing
source share
2 answers

You need to place the isset element inside the if element.

 <if> <isset property="foo" /> 

The manual is available here .

+16
source share

If you just need to fail the assembly, if the property is defined or not, check the fail task:

http://www.phing.info/docs/guide/stable/FailTask.html

0
source share

All Articles