ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leondz <>
Subject How to execute a target multiple times, with different parameters
Date Fri, 29 Feb 2008 11:46:58 GMT


I'm new to ant. I have a target in an existing project that looks like this:

        <target name="get-docs">
                        <fail unless="jar.present" message="TREC Apps cannot
be run until they have been built!"/>
                        <java fork="true"
                                <jvmarg value="-Xmx512m"/>
                                <jvmarg value="-Dgate.home=${gate.home}"/>
                                <jvmarg value="-Dnlp.plugins=${plugins}"/>
                                <arg value="QA2006_testset.xml"/>
                                <arg value="QA2006_terrier"/>
                                <arg value="200"/>
                                <arg value="Terrier (AQUAINT)"/>
                                        <fileset file="${jar.file}"/>
                                        <fileset dir="${framework}">
                                                <include name="**/*.jar"/>
                                        <fileset dir="${lib.shared}">
                                                <include name="**/*.jar"/>
                                        <fileset dir="${plugins}">
                                                <include name="**/*.jar"/>

I want to run it a few times, using different values for the args. I don't
mind doing this from within ant, or from a shell script, but I'm not sure
how to automatically modify the arguments. What are the options?

View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message