Return-Path: Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 83474 invoked by uid 500); 11 Jul 2003 18:53:10 -0000 Mailing-List: contact user-help@ant.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 user@ant.apache.org Received: (qmail 83441 invoked from network); 11 Jul 2003 18:53:09 -0000 Received: from out1.smtp.messagingengine.com (HELO mail.messagingengine.com) (66.111.4.25) by daedalus.apache.org with SMTP; 11 Jul 2003 18:53:09 -0000 Received: from mail.messagingengine.com (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 88CB21C530 for ; Fri, 11 Jul 2003 14:53:12 -0400 (EDT) Received: from 10.202.2.150 ([10.202.2.150] helo=mail.messagingengine.com) by messagingengine.com with SMTP; Fri, 11 Jul 2003 14:53:12 -0400 X-Epoch: 1057949592 X-Sasl-enc: /N7RZFyDIIBdiNj5K5Xe6A Received: from fastmail.fm (tc.telecomputing.no [213.203.17.243]) by www.fastmail.fm (Postfix) with ESMTP id D09431DE22 for ; Fri, 11 Jul 2003 14:52:35 -0400 (EDT) Message-ID: <3F0F076D.401@fastmail.fm> Date: Fri, 11 Jul 2003 20:52:29 +0200 From: Igor Bukanov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: AW: Search for file in parent directories References: <879A5AD5DD0ED511891F0003473A9B5608FF6BC1@Z011004> In-Reply-To: <879A5AD5DD0ED511891F0003473A9B5608FF6BC1@Z011004> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N At the end I put a patch to extend to get what I want to bugzilla: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21494 With that I can write: to locate build in the project's base dir or its parents. Yes, I can use javascript, but that is messy especially if I want to use that code from multiple files. In the mean time I wrap ant invocation into a shell script that does the search for all properties that I need. Regards, Igor Jan.Materne@rzf.fin-nrw.de wrote: > He, he > > a very quick hack, but works (but without any exception handling): > > > > > > > > > > > > ${file} found in ${location} > > > > > > Maybe you want to start here... > > > Jan > > > > >>-----Urspr�ngliche Nachricht----- >>Von: Igor Bukanov [mailto:igor@fastmail.fm] >>Gesendet am: Dienstag, 8. Juli 2003 19:00 >>An: user@ant.apache.org >>Betreff: Search for file in parent directories >> >>Hi! >> >>I would like to search for the given file name in the given >>directory or >>one of its parents and set a property to found location. >>Something like >>ant -find does. Are there any better way to do it then >>use when >>searching for a.txt: >> >>> file="a.txt" value="a.txt"/> >>> file="../a.txt" value="../a.txt"/> >>> file="../../a.txt" value="../../a.txt"/> >>> file="../../../a.txt" value="../../../a.txt"/> >>etc. >> >> >>Although it works if there is single a.txt in searched parent >>directories, but when there several a.txt, then trouble >>starts. First a >>warning will be produced about changing of property value, >>and second, >>it will set found-path to the outemost a.txt. I can fix the later by >>reversing order, but then I would depend on deprecated >>bahaviour. >> >>Any better ways to do it? >> >>Regards, Igor >> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>For additional commands, e-mail: user-help@ant.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org