Thanks David and Conor. <apply> with <uptodate> did the job
perfectly--though it's a pity I had to invoke the jvm direct with
${java.home}/bin/java rather than just use a <java> task.
Ron
----- Original Message -----
From: "Conor MacNeill" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Thursday, August 22, 2002 10:45 AM
Subject: Re: Can Ant iterate?
> Ron Chernich wrote:
> > We are considering migrating from make to ant for our Java projects, but
have hit a hitch where a makefile tag needs to iterate over a pattern
matched set of files, calling a java application. Something like:
> >
> > LIST=`ls config/*.xml`
> > ...
> > for F in $(LIST); do
> > $(JAVA) com.mumble.SchemaCompiler $(F)
> > done
> >
> > I can see how FileSet will give me the list and AntCall could execute a
Task to run our schema compiler, but can't see how to join the two up. Is
it possible or do we just not get it?
> >
> > Ron Chernich
> > Engineering Director, DSTC
> >
>
> You have 3 choices
>
> 1. Use <apply>, possibly combined with <uptodate> and execute your
> schema compiler for the files in a fileset.
>
> 2. Write a Task to do it and the necessary dependency checks, fileset
> support, etc. Tasks are pretty easy to write and can make your build
> files clearer. Many tasks are just wrappers for running the java task
> anyway. The task can be built as part of the build.
>
> 3. Use <script> (not recommended in general)
>
> Conor
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>