ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
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 <tassilo@member.fsf.org> 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"/>
    <srcfile/>
    <arg line="-p ${src.dir}"/>

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

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?).

Stefan

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


Mime
View raw message