ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: Automating without foreach?
Date Tue, 04 May 2010 18:05:55 GMT
Hello Misha,

ant out of the box is not designed for procedural work. You could create 
a custom task doing the iteration over a list of platforms.
Which would be like a dedicated for task.

A trick which I have learned and used myself is to generate on the fly a 
small build file using xslt and invoke it using <ant/>

Not especially beautiful but it works.

Regards,

Antoine

Misha Koshelev wrote:
> Dear All:
>
> I was wondering if there might be a simple, ant-specific way to automate tasks like this:
>
> <target name="jar-all" depends="pre-dist-all,compile">
>   <antcall target="jar">
>     <param name="platform" value="gtk-linux-x86_64"/>
>   </antcall>
>   <antcall target="jar">
>     <param name="platform" value="win32-win32-x86"/>
>   </antcall>
> </target>
>
> Specifically, I'd like to have  a list of platforms, and be able to repeat a task for
each platform like above.
>
> Any help much appreciated!
>
> Thank you
> Misha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message