Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 84998 invoked from network); 21 Sep 2006 09:09:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Sep 2006 09:09:09 -0000 Received: (qmail 12773 invoked by uid 500); 21 Sep 2006 09:09:09 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 12450 invoked by uid 500); 21 Sep 2006 09:09:08 -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 12439 invoked by uid 99); 21 Sep 2006 09:09:08 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Sep 2006 02:09:08 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=stevel@apache.org; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain apache.org from 192.6.10.2 cause and error) Received: from [192.6.10.2] ([192.6.10.2:43987] helo=colossus.hpl.hp.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id D1/25-04092-0B652154 for ; Thu, 21 Sep 2006 02:09:06 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by colossus.hpl.hp.com (Postfix) with ESMTP id E586D6BA13 for ; Thu, 21 Sep 2006 10:08:58 +0100 (BST) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from colossus.hpl.hp.com ([127.0.0.1]) by localhost (colossus.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8-LIc+Yl9hLo for ; Thu, 21 Sep 2006 10:08:58 +0100 (BST) Received: from ha-node-br1.hpl.hp.com (ha-node-br1.hpl.hp.com [16.25.144.56]) by colossus.hpl.hp.com (Postfix) with ESMTP id B47506BA0B for ; Thu, 21 Sep 2006 10:08:57 +0100 (BST) Received: from [16.25.171.182] (chamonix.hpl.hp.com [16.25.171.182]) by ha-node-br1.hpl.hp.com (8.13.4/8.13.4) with ESMTP id k8L98mOK020744 for ; Thu, 21 Sep 2006 10:08:48 +0100 (BST) Message-ID: <451256A0.1080806@apache.org> Date: Thu, 21 Sep 2006 10:08:48 +0100 From: Steve Loughran User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: Ant Developers List Subject: Re: Resource.getURL() References: <20060920145752.33304.qmail@web55107.mail.re4.yahoo.com> <87k63xltxb.fsf@www.samaflost.de> In-Reply-To: <87k63xltxb.fsf@www.samaflost.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-HPL-MailScanner-Information: Please contact the ISP for more information X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-From: stevel@apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Stefan Bodewig wrote: > On Wed, 20 Sep 2006, Matt Benson wrote: >> --- Antoine Levy-Lambert wrote: >> >>> Hello Matt, >>> >>> thanks for fixing my fixes ! >>> >>> did you already add getURL() to all Resource(s) ? >>> this would be cool to be able to always set the >>> SystemId in case of XML documents of all sorts. >> I have been thinking it might make sense to add >> getURL() to Resource. Did a discussion on that >> already take place? > > I don't remember any. > > Given that Resource as a class and not an interface we are able to add > new methods even after 1.7.0 without running the risk of breaking the > code of people who implement their own resources. Given that there > wouldn't be any code in Ant 1.7.0 that used getURL() we should defer > adding the method as well, IMHO. maybe, but if a subclass adds its own getURL() method bad things happen. Also, if subclasses ought to override it, then we dont give ant1.7-based resources a warking. > >> And, for example, what would we do for resources of >> nonstandard "protocols"? Would a StringResource with >> value "foo" return "string:foo" as its URL? Should we >> install custom protocol handlers for built-in >> resources and encourage the same be done for >> third-party resource implementations? > > +1 for custom protocol handlers. Its very hard to add custom protocol handlers in java once you have a classloader tree. and you increase the effort needed to implement a resource. How about having a hasURL interface that resources can implement? That way things like my component dont need to bother.? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org