Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 94477 invoked from network); 26 May 2000 23:21:30 -0000 Received: from mailhost.lanl.gov (128.165.3.12) by locus.apache.org with SMTP; 26 May 2000 23:21:30 -0000 Received: from cic-mail.lanl.gov (cic-mail.lanl.gov [128.165.3.68]) by mailhost.lanl.gov (8.9.3/8.9.3/(cic-5, 2/8/99)) with ESMTP id RAA23404 for ; Fri, 26 May 2000 17:21:31 -0600 Received: from pcd.lanl.gov (ts-usr-174.lanl.gov [128.165.7.174]) by cic-mail.lanl.gov (8.9.3/8.9.3/(cic-5, 2/9/99)) with ESMTP id RAA13631 for ; Fri, 26 May 2000 17:21:25 -0600 (MDT) Message-Id: <4.3.1.2.20000526172030.0433b840@cic-mail.lanl.gov> X-Sender: u076663@cic-mail.lanl.gov X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Fri, 26 May 2000 17:21:28 -0600 To: ant-dev@jakarta.apache.org From: David Forslund Subject: Re: [PATCH] exec with include/exclude In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I tried the patch and find the jidl program opens up a bunch of command windows on NT and although jidl appears to process the idl files, nothing is written to disk. Dave At 10:43 AM 5/26/00 +1200, you wrote: >I wrote a trivial extension to the existing Exec task definition to make >it include/exclude aware and I have already posted it here, but >without any (positive or negative) feedback. > >With the patch, the Exec task will behave as usual if used as >usual. However, if used with the additional optional attribute 'src' which >should be a directory, it will search for files, and will exec a command >with attached list of files as an additional last argument. >'src' attribute can be renamed to 'dir' or whatever will be the 'standard >look&feel' for matching tasks. > >One can use the modified Exec for any task which requires executing a >binary program with a list of files being its arguments; >for example to compile multiple *.idl files: > >(*) command="jidl --output-dir ${src.dir} --package com.my.idl" > src="src/idls" output="out.txt"/> > >if inside ${basedir}/src/idls we have files: a.idl, b.idl, c.txt >it would execute effectively: > >cd ${basedir}; jidl --output-dir src/main --package com.my.idl \ >${basedir}/src/idl/a.idl ${basedir}/src/idl/b.idl ${basedir}/src/idl/c.txt > > >(*) command="jidl --output-dir ${src.dir} --package com.my.idl" > src="src/idl" output="out.txt"> > > > >if inside ${basedir}/src/idls we have files: a.idl, b.idl, c.txt >it would execute effectively: > >cd ${basedir}; jidl --output-dir src/main --package com.my.idl \ >${basedir}/src/idl/a.idl ${basedir}/src/idl/b.idl > > >The patch assumes that the command should be invoked once with the list of >all matching files appended to the list of arguments. I cannot find any >use of executing commands in list of files sequentially file after file >with unknown order but if somebody needs it, the patch can be easily >extended (i.e. exec task can be easily extended by additional >flag: 'sequential="true"'). Maybe there are usefull file/source processors >which can deal with single file at once only. All tools I use can take a >list of arguments, and single invocation is enough. > > >best regards >Mariusz