Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 70981 invoked from network); 1 Feb 2005 17:03:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Feb 2005 17:03:30 -0000 Received: (qmail 46252 invoked by uid 500); 1 Feb 2005 17:03:20 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 46193 invoked by uid 500); 1 Feb 2005 17:03:19 -0000 Mailing-List: contact user-help@ant.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 user@ant.apache.org Received: (qmail 46177 invoked by uid 99); 1 Feb 2005 17:03:19 -0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp10.intermedia.net (HELO smtp10.intermedia.net) (64.78.61.91) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Feb 2005 09:03:18 -0800 Received: from ehost010-1.exch010.intermedia.net ([64.78.61.16]) by smtp10.intermedia.net with Microsoft SMTPSVC(6.0.3790.211); Tue, 1 Feb 2005 09:03:15 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Working directory confusion Date: Tue, 1 Feb 2005 09:03:15 -0800 Message-ID: <80369A4422B7C74A9E3A4C0B980AFA58078600A7@ehost010-1.exch010.intermedia.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Working directory confusion thread-index: AcUIf+tBSDhSS3mxR6eSf4luxsz3Rw== From: "Rick Genter" To: "Ant Users List" X-OriginalArrivalTime: 01 Feb 2005 17:03:15.0893 (UTC) FILETIME=[EBBE8E50:01C5087F] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I'm getting confused on how the notion of "current working directory" is maintained in ant. Here's my test script: =09 Calling sub1-test via <ant> task: Calling sub1-test via ant.bat: =09 My basedir is ${basedir}. My current directory is ${user.dir}. When I run the above (ant 1.6.2), I get: Buildfile: C:\workspace-4\Object\test.xml sub1: [delete] Deleting directory C:\workspace-4\Object\sub1 [mkdir] Created dir: C:\workspace-4\Object\sub1 [copy] Copying 1 file to C:\workspace-4\Object\sub1 [echo] Calling sub1-test via task: sub1-test: [echo] My basedir is C:\workspace-4\Object\sub1. [echo] My current directory is C:\workspace-4\Object. [echo] Calling sub1-test via ant.bat: [exec] Buildfile: test.xml [exec] sub1-test: [exec] [echo] My basedir is C:\workspace-4\Object\sub1. [exec] [echo] My current directory is C:\workspace-4\Object\sub1. [exec] BUILD SUCCESSFUL [exec] Total time: 0 seconds all: BUILD SUCCESSFUL Total time: 1 second Note that when invoked by the task, ${user.dir} !=3D ${basedir} within the task, while when invoked via the command line ${user.dir} =3D=3D ${basedir}. Is there a way to get ${user.dir} =3D=3D ${basedir} using the task? (I need this so that files that are referenced by the Java program I invoke from my task are found.) -- Rick Genter Principal Engineer Silverlink Communications (781) 272-3080 x242 This e-mail, including attachments, may include confidential and/or proprietary information, and may only be used by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org