ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Run an ant task for each file in a directory
Date Fri, 07 Nov 2008 05:25:41 GMT
On Thu, 06 Nov 2008, Tassilo Horn <> wrote:

> What I really want is to execute the given `java' task for each and
> every *.tg file in ${schema.dir}/.  How would I do that?

You can use <apply> and set up the java command line correctly,
something like

  <apply executable="java">
    <arg value="-cp"/>
    <arg pathref="classpath"/>
    <arg value="de.uni_koblenz.jgralab.utilities.tgschema2java.TgSchema2Java"/>
    <arg value="-f"/>
    <arg line="-p ${src.dir}"/>

    <fileset dir="${schema.dir}" includes="*.tg"/>

I realize that you really want an extension of <java> in the same way
that <apply> extends <exec> and in fact you are not the first one.
But such a task hasn't been written (yet?).


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

View raw message