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
Rebhan, Gilbert wrote:
-----Original Message-----
From: Paul Taylor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2008 10:30 AM
To: Ant Users List
Subject: Re: How do I call antcall once per line of file using line
value as parameter?
/*
I did it using Ant-contrib as follows
<target name="Maintask">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<loadfile property="params" srcFile="inputfile"/>
<foreach list="${params}" delimiter="
" target="subtask"
param="param1"/>
</target>
*/
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]