Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 77343 invoked from network); 21 Mar 2007 05:23:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Mar 2007 05:23:56 -0000 Received: (qmail 23590 invoked by uid 500); 21 Mar 2007 05:24:04 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 23295 invoked by uid 500); 21 Mar 2007 05:24:03 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 23284 invoked by uid 99); 21 Mar 2007 05:24:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 22:24:02 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [88.84.142.181] (HELO samaflost.de) (88.84.142.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2007 22:23:54 -0700 Received: from localhost (unknown [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id 4FB538BC0711 for ; Wed, 21 Mar 2007 05:23:33 +0000 (UTC) Received: from samaflost.de ([127.0.0.1]) by localhost (v30161.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13537-04 for ; Wed, 21 Mar 2007 06:23:32 +0100 (CET) Received: by samaflost.de (Postfix, from userid 2525) id 0197A8BC071E; Wed, 21 Mar 2007 06:23:32 +0100 (CET) To: dev@ant.apache.org Subject: Re: archivefileset resources X-Draft-From: ("nnfolder:mail.jakarta-ant" 79678) References: <20070306125254.35480.qmail@web55102.mail.re4.yahoo.com> From: Stefan Bodewig Date: Wed, 21 Mar 2007 06:23:31 +0100 In-Reply-To: <20070306125254.35480.qmail@web55102.mail.re4.yahoo.com> (Matt Benson's message of "Tue, 6 Mar 2007 04:52:53 -0800 (PST)") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at samaflost.de X-Virus-Checked: Checked by ClamAV on apache.org Sorry for dropping the ball. On Tue, 6 Mar 2007, Matt Benson wrote: > --- Stefan Bodewig wrote: >> If you go that route, could you please extract the supporting >> methods into an interface that would allow other implementations to >> return ressources that change their names when used? Something >> like >> >> >> >> >> >> >> which would return all files from the fileset and map the names of >> them (by returning Ressources that implement the new interface). > > This sounds like the feature Alexey has been demanding > all these years. ;) Possibly. But it is a bit tricky, I'm afraid. We would want to have a FileRessource remain a FileRessource even when mapping them - same for the other subclasses of Ressource. Some kind of factory would be needed and using an intferface instead of creating yet another subclass of Ressource (or a couple of them) might help. > But to do this with an interface means its consumers would have to > check for it explicitly; put another way, that all resource > consumers would not immediately benefit. If we implemented the > name-mapping behavior such that it simple overrode getName(), the > consequent question is why have an interface at all? The interface could provide access to the original name and override getName(). But before you dare to override getName, better check usage patterns in existing tasks. I wouldn't be surprised if we still had tasks that used "new File(parentDir, ressource.getName())" or something similar and expected the file to exist. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org