You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Roman Kennke <ro...@kennke.org> on 2008/07/02 07:54:22 UTC
Re: How do I call antcall once per line of file using line value
as parameter?
Hi,
The foreach task from ant-contrib could help:
http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html
Dunno how to get the lines of a file in a list though. I'm sure it is
possible.
/Roman
Am Mittwoch, den 02.07.2008, 00:20 +0100 schrieb Paul Taylor:
> Hi, sure simple enough, but cant work out to iterate through lines of
> file, i,e how do I implement the for loop in pseudo code below
>
> <target name="Maintask">
> <file name="inputfile"/>
> for line in file
> <antcall target="subtask"><param name="param1
> value="nextlineoffile"/></antcall>
> rof
> </target>
>
> <target name=Subtask">
> <dosomething param="${param1}"/>
> </target>
>
> thanks Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
--
http://kennke.org/blog/
Re: How do I call antcall once per line of file using line value as
parameter?
Posted by Steven Guitar <st...@mac.com>.
i have used regular expressions to either take multilines and format
them to one line with comma delimited entries for the ant contrib
foreach
On Jul 2, 2008, at 12:54 AM, Roman Kennke wrote:
> Hi,
>
> The foreach task from ant-contrib could help:
>
> http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html
>
> Dunno how to get the lines of a file in a list though. I'm sure it is
> possible.
>
> /Roman
>
> Am Mittwoch, den 02.07.2008, 00:20 +0100 schrieb Paul Taylor:
>> Hi, sure simple enough, but cant work out to iterate through lines of
>> file, i,e how do I implement the for loop in pseudo code below
>>
>> <target name="Maintask">
>> <file name="inputfile"/>
>> for line in file
>> <antcall target="subtask"><param name="param1
>> value="nextlineoffile"/></antcall>
>> rof
>> </target>
>>
>> <target name=Subtask">
>> <dosomething param="${param1}"/>
>> </target>
>>
>> thanks Paul
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
> --
> http://kennke.org/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org