Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 58058 invoked from network); 4 May 2007 07:39:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 May 2007 07:39:00 -0000 Received: (qmail 71886 invoked by uid 500); 4 May 2007 07:39:04 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 70970 invoked by uid 500); 4 May 2007 07:39:02 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 70956 invoked by uid 99); 4 May 2007 07:39:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 00:39: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 [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 00:38:52 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id 9137F4C0A5 for ; Fri, 4 May 2007 08:38:30 +0100 (BST) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id I56uNYhsecSt for ; Fri, 4 May 2007 08:38:29 +0100 (BST) Received: from ha-node-br3.hpl.hp.com (ha-node-br3.hpl.hp.com [16.25.144.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tobor.hpl.hp.com (Postfix) with ESMTP id 619E94C09F for ; Fri, 4 May 2007 08:38:29 +0100 (BST) Received: from [16.27.195.106] ([16.27.195.106]) by ha-node-br3.hpl.hp.com (8.14.1/8.13.4) with ESMTP id l447cAUS021889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 4 May 2007 08:38:17 +0100 (BST) Message-ID: <463AE2CD.70104@apache.org> Date: Fri, 04 May 2007 09:37:49 +0200 From: Steve Loughran User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Ant Users List Subject: Re: AW: Ant+Ivy BOF at ApacheCon tonight References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; 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-Virus-Checked: Checked by ClamAV on apache.org Jan.Materne@rzf.fin-nrw.de wrote: >> Xavier convinced me to slot us in at 9pm in room 3. If we should be >> only very few people, we might turn the BOF into a dinner, who knows. > > Some news from the BOF? I have a hangover. Actually, during the day I've been starting to factor out file access from FileResource. A lot of tasks only work with files, but right now they have hard coded expectations that files come from FileResource instances. Really, files should come from anything that is a FileProvider public interface FileProvider { /** * Get the file represented by this Resource. * @return the file. */ File getFile(); } Having looked at the tasks, I am not going to do any major reworks without talking to Stefan (who is chairing the maven talk, I am in the tomcat 6 talk right now). A lot of uses have phrases like (Pack.java): if (src instanceof FileResource) { source = ((FileResource) src).getFile(); } else if (!supportsNonFileResources()) { throw new BuildException("Only FileSystem resources are" + " supported."); } which should go to FileProvider. Easy But other tasks (Tar) seem to contain their own basedir resolution: FileResource r = (FileResource) iter.next(); File f = r.getFile(); if (f == null) { f = new File(r.getBaseDir(), r.getName()); } or this stuff in Copy String name = r.getName(); if (r instanceof FileResource) { FileResource fr = (FileResource) r; baseDir = getKeyFile(fr.getBaseDir()); if (fr.getBaseDir() == null) { name = fr.getFile().getAbsolutePath(); } } I think we may need to pull a lof of this check for null and make basedir-relative resolution something inside the FileProvider implementations. With a method String getAbsolutePath() then that could be used whenever you want an absolute path. Does this make sense? -steve --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org