How on earth do you check a number property is less than in Apache Ant?
<property name="small" value="15"/>
<property name="big" value="156"/>
<fail message="small is less than big!">
<condition>
<lessthan val1="${small}" val2="${big}"/>
</condition>
</fail>
From what I've seen (I'm new to Ant) you can only do <equal/>
?
You could use a <scriptcondition>
(see http://ant.apache.org/manual/Tasks/conditions.html).
Read the documentation carefully because it would need installing additional jar dependencies in ant.
The condition could look like that (not tested):
<scriptcondition language="javascript">
var small = parseInt(project.getProperty("small"));
var big = parseInt(project.getProperty("big"));
self.setValue(small < big);
</scriptcondition>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With