ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject Re: How to execute a target multiple times, with different parameters
Date Fri, 29 Feb 2008 12:06:44 GMT
I would suggest to use a macro instead of a target.

Gilles

On 29/02/2008, leondz <leondz@gmail.com> wrote:
>
>
> Hi,
>
> 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"
> classname="shef.qa.trec.GetRelevantDocuments">
>                                 <jvmarg
> value="-
> Djava.library.path=/share/nlp.raid1/trec_qa/darwin/apps/indri-2.6/swig/obj/java
> "/>
>                                 <jvmarg value="-Xmx512m"/>
>                                 <jvmarg value="-Dgate.home=${gate.home}"/>
>                                 <jvmarg value="-Dnlp.plugins=${plugins}"/>
>                                 <jvmarg
> value="-Dwordnet.home=${wordnet.home}"/>
>                                 <arg value="QA2006_testset.xml"/>
>                                 <arg value="QA2006_terrier"/>
>                                 <arg value="200"/>
>                                 <arg value="Terrier (AQUAINT)"/>
>                                 <classpath>
>                                         <fileset file="${jar.file}"/>
>                                         <fileset dir="${framework}">
>                                                 <include name="**/*.jar"/>
>                                         </fileset>
>                                         <fileset dir="${lib.shared}">
>                                                 <include name="**/*.jar"/>
>                                         </fileset>
>                                         <fileset dir="${plugins}">
>                                                 <include name="**/*.jar"/>
>                                         </fileset>
>                                 </classpath>
>                         </java>
>         </target>
>
>
>
> 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?
>
> Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/How-to-execute-a-target-multiple-times%2C-with-different-parameters-tp15756893p15756893.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Gilles Scokart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message