In Ant-contrib, we can do something like:
<for list="a,b,c,d" param="instence">
But if I don't have a list, I only have a limit, e.g. limit=4.
Is there a way to do for loop based on limit, like:
<for limit="4" param="index">
<project name="Attachments" default="print">
<property name="numAttachments" value="20" />
<target name="generate">
<script language="javascript"><![CDATA[
var list = '1';
var limit = project.getProperty( "numAttachments" );
for (var i=2;i<limit;i++)
{
list = list + ',' + i;
}
project.setNewProperty("list", list);
]]>
</script>
</target>
<target name="print" depends="generate">
<for list="${list}" param="letter">
<sequential>
<echo>Letter @{letter}</echo>
</sequential>
</for>
</target>
</project>