Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 87188 invoked from network); 24 Apr 2006 09:05:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Apr 2006 09:05:05 -0000 Received: (qmail 74528 invoked by uid 500); 24 Apr 2006 09:04:56 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 74439 invoked by uid 500); 24 Apr 2006 09:04:55 -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 74427 invoked by uid 99); 24 Apr 2006 09:04:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2006 02:04:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [213.188.134.18] (HELO mailengine10.web2000.activeisp.com) (213.188.134.18) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2006 02:04:54 -0700 Received: from LARK (unverified [195.7.255.86]) by webmail.activeisp.com (Rockliffe SMTPRA 6.1.20) with ESMTP id for ; Mon, 24 Apr 2006 11:04:36 +0200 From: "Tim Gordon" To: "Ant List" Subject: File URLs for different plaforms Date: Mon, 24 Apr 2006 10:01:11 +0100 Message-ID: <005101c6677d$a24d0f90$1001000a@LARK> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcZnfaGeCBxvRua5S+KtnxM7TuHCKQ== X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Not a pure ANT question, but it's relevant to building configurations for remote systems, possibly of another OS... Is there a simple way to generate file URLs that are guaranteed to work on another platform? For example, something like: config.url=file://${file.system.path} doesn't work for *nix systems and Windows, because you'll get something like config.url=file:///home/user/settings.properties which is fine under *nix, but config.url=file://C:\Documents and Settings\user\settings.properties under Windows, which isn't a valid URL because it Java starts looking for a host call 'C'. The simplest way out seems to be to define my config.url propeties like config.url=file:///${file.system.path} instead, because *nix absorbs the superfluous forward-slash but this doesn't seem to be a very elegant solution. Tim Gordon Allustra Limited Paxton House 30 Artillery Lane London E1 7LS Tel +44 (0)20 7539 5722 Fax +44 (0)20 7539 5710 http://www.allustra.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org