Restrict values to ant Property task -


what simplest implementation restrict values property?

property name="prop_name"  value="${dynamic_value} 

i want have values ${dynamic_value} restricted set.

thanks, wajid

you may use scriptcondition (see ant manual conditions) builtin javascript engine
(included in java >= 1.6.x), f.e. :

<project>  <property name="foo" value="26"/>  <fail message="value of $${foo} not in range => [${foo}] !">   <condition>    <scriptcondition language="javascript">     var foo = parseint(project.getproperty("foo"));     self.setvalue(foo &lt;= 20 || foo &gt;= 25);    </scriptcondition>  </fail> </project> 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -