Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 6218 invoked from network); 22 Aug 2002 02:45:14 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 22 Aug 2002 02:45:14 -0000 Received: (qmail 27161 invoked by uid 97); 22 Aug 2002 02:45:42 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 27146 invoked by uid 97); 22 Aug 2002 02:45:41 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 27103 invoked by uid 98); 22 Aug 2002 02:45:40 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <000c01c24985$ecbf6740$e3b16682@dstc.edu.au> From: "Ron Chernich" To: "Ant Users List" References: <1a7401c24974$f6368f80$e3b16682@dstc.edu.au> <3D643418.1030902@cortexebusiness.com.au> Subject: Re: Can Ant iterate? Date: Thu, 22 Aug 2002 12:45:06 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Checked: SPAMASSASSIN: This message probably not SPAM X-Spam-Score: 1.6, Required: 5 X-Virus-Scanned: Message: ok X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks David and Conor. with 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 task. Ron ----- Original Message ----- From: "Conor MacNeill" To: "Ant Users List" 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 , possibly combined with 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