ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <>
Subject Re: How do I call antcall once per line of file using line value as parameter?
Date Wed, 02 Jul 2008 18:07:04 GMT
Paul Taylor schrieb:
> I dont understand Ruby so this wouldnt be an option for me. It just 
> seems that this is such a common problem that it shoulg go into ant proper

As you already noticed, (core) ant has it limits. OK, to be fair, it
was never meant as a scripting language, but is often used
like that.

If i get to the limits i use <script> with (j)ruby or write a new task.
There are other languages that run in the VM via BSF, f.e. if you want a
syntax similar to java, use beanshell or javascript (rhino).

>> also possible without antcontrib =
>> <script language="ruby">
>> <![CDATA[
>>   echoTask = $project.createTask 'echo'
>>   IO.readlines("Y:/foobar.txt").each do |line|
>>     echoTask.addText(line)
>>     echoTask.execute
>>   end
>> ]]>
>> </script>
>> you have full access to the ant api

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message