There is a foreach task in the Ant Contrib tasks: <http://ant-contrib.sourceforge.net/ant-contrib/manual/tasks/>
We recently discussed that the <for> task is not defined in the properties file, but was defined in the antlib.xml file (if I remember correctly). However, the <foreach> task is defined in the properties file, but not the antlib.xml file. Try the <foreach> task first and see if that'll work for you. To see how to use the Ant Contrib jar file: http://ant-contrib.sourceforge.net/ To download, try this link: http://sourceforge.net/projects/ant-contrib/files/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip/download You could put the ant-contrib.jar file inside your $ANT_HOME/lib directory, but that'll require everyone to have that installed. Better put this in your project, so when someone checks out the repository, they'll have that file. Let's say you put this in a directory called $PROJ_HOME/antlib. You need to put this in your build.xml <taskdef resource="net/sf/antcontrib/antcontrib.properties"> <classpath> <fileset dir="${basedir}/lib/antlib"> <include name="*.jar"/> </fileset> </classpath> </taskdef> On Tue, May 4, 2010 at 1:45 PM, Misha Koshelev <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > > -- David Weintraub [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
