ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: java task over a set of files
Date Mon, 22 Apr 2002 22:17:10 GMT
If your <java> task can takes a bunch of files on the command line, you can
define the <fileset> outside the <java> task (but inside the same <target>
usually), convert it to a (very?) long list of filenames (absolute or
relative) using <pathconvert> stuffed inside a property. Simply de-reference
that property in am <arg> sub-element of your <java> task. It goes a bit
like this:

<target name="atarget">
  <fileset if="gg-fileset" dir="somewhere" includes="*.gg" />
  <pathconvert refid="gg-fileset" pathsep=" " property="gg-files" />
  <java classname="${javaprogram}">
    <arg line="${gg-files}" />

If your Java program doesn't work that way (ANT uses Javac this way), then
maybe resend your question with a bit more details. Hope this helps, --DD

-----Original Message-----
From: Marc Poulin [] 
Sent: Monday, April 22, 2002 5:04 PM
To: ''
Subject: java task over a set of files

We are in the early stages of converting our build process to ant.  It has
gone well so far, but I have run into
 a bit of a snag.  Our Make process uses a java class to process a bunch of
files, namely:

  $(javaprogram)  --arg --anotherarg *.gg

I have been unable to figure out how to "antify" this, since the java task
won't accept fileset nested elements.  Is there a way to run a java class
against a bunch of input files in an inexpensive (jvm/processor-wise) way?
Thanks in advance,

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

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

View raw message