ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Chernich" <chern...@dstc.edu.au>
Subject Re: Can Ant iterate?
Date Thu, 22 Aug 2002 02:45:06 GMT
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" <conor@cortexebusiness.com.au>
To: "Ant Users List" <ant-user@jakarta.apache.org>
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:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>


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


Mime
View raw message