Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 36777 invoked from network); 13 Jan 2003 19:09:42 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 13 Jan 2003 19:09:42 -0000 Received: (qmail 4850 invoked by uid 97); 13 Jan 2003 19:09:16 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 4757 invoked by uid 97); 13 Jan 2003 19:09:14 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 4706 invoked by uid 98); 13 Jan 2003 19:09:13 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "Craig Goss" To: "Ant Users List" Subject: RE: ant apply and file.separator Date: Mon, 13 Jan 2003 14:07:52 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <5.0.2.1.0.20030113103407.0232be38@mail.ergotech-usa.com> Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 1. Doesn't ${file.separator} just pick up the system file.separator for the platform? For example, if I'm running on Windows, the system separator is '\', so will turn out to be exactly the opposite of what I want? I examined Ant's shell file and it does accommodate Cygwin at launch by modifying path formats to use forward slashes, but as far as I can tell there's no residual effect once Ant is running. Just to make sure I wasn't crazy I tried your suggestion and the result matched my expectations ... back slashes instead of forward slashes. 2. You can only use ${file.separator} when you're specifying a path in the build file. Ant's task executes an operation for each file in a file set. It constructs the path for the individual files with the help of a few hints from a . At execution time you can change specify the location of the file names in an argument list, but there doesn't appear to be any way to modify the parameters ( and ). In summary, I can see how ${file.separator} is a good solution when switching between platforms, but the property has to be right to begin with in order for it to work. In this case I'm running on a Windows platform but the executable expects that all paths will be in Unix format. Since Ant doesn't really know that, it doesn't make any accommodation. It seems to me that Ant often allows for this kind of thing by allowing the developer to use etc, but in the case of that's not allowed. -----Original Message----- From: Elizabeth Cooper [mailto:ecooper@ergotech.com] Sent: Monday, January 13, 2003 12:36 PM To: Ant Users List Subject: Re: ant apply and file.separator Try this: Instead of "hard-coding" the slash in the ant code, use ${file.separator}. It makes the statement longer but always works. For example instead of: ${cygwin.path}/bin/bash.exe you type: ${cygwin.path}${file.separator}bin${file.separator}bash.exe -- To unsubscribe, e-mail: For additional commands, e-mail: