Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 61519 invoked from network); 20 Jun 2006 19:28:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 19:28:55 -0000 Received: (qmail 39350 invoked by uid 500); 20 Jun 2006 19:28:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 39298 invoked by uid 500); 20 Jun 2006 19:28:50 -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 39287 invoked by uid 99); 20 Jun 2006 19:28:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 12:28:50 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [72.3.232.96] (HELO email.accsense.com) (72.3.232.96) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 12:28:48 -0700 Received: from [192.168.1.165] (ip-64-7-28-211.lax.megapath.net [64.7.28.211]) by email.accsense.com (Postfix) with ESMTP id D36143F8641 for ; Tue, 20 Jun 2006 12:28:26 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <255d8d690606201047p5f12afa8w7017194b8e390f86@mail.gmail.com> References: <449832A2.9090106@hotpop.com> <255d8d690606201047p5f12afa8w7017194b8e390f86@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: kindsol Subject: Re: NEWBIE: Dir-attribute/script problem Date: Tue, 20 Jun 2006 12:28:21 -0700 To: "Ant Users List" X-Mailer: Apple Mail (2.750) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thank a bunch for the reply! I have never used p.resolveFile() and am having a hard time finding documentation on it. Is it Ant api or python? Would you use it directly inside >> Thanks again! Sorry for my ignorance. -Sol On Jun 20, 2006, at 10:47 AM, Dominique Devienne wrote: > The 'cwd' is never changed. What changes in the project's basedir, > based on the various attributes that accepts. See the table in > 's documentation for details. > > Personally, I always use instead of , to avoid messing > up the 'basedir'. You probably also want to use > p.resolveFile(relative_filename) within your script to translate > relative_filename to an abs. path relative to the project's basedir, > rather than 'cwd', which can be different depending where you call the > build from. > > Leaving the 'basedir' alone, combined with p.resolveFile() should do > the trick. --DD > > On 6/20/06, Sol Kindle wrote: >> Hey now, >> >> This is my first Ant project (so please bear with me). My goal >> here is >> to have a single Ant file to build all of my sub-projects. >> >> I am having some trouble getting a third party Ant project (call it >> "foo") to run as a subproject to my "top-level" build project. >> The Foo >> build runs just fine when Ant is run directly on it (in it's sub- >> dir), >> but fails to run a jython script when called from my "top-level" >> build >> file. Here's the failure output... >> >> Buildfile: build.xml >> foo: >> bar: >> [script] Traceback (innermost last): >> [script] File "", line 9, in ? >> [script] ImportError: no module named buildUtil >> BUILD FAILED >> >> It fails because the script in the "bar" target cannot find cannot >> find >> the buildUtil.py file. But the buildUtil.py file is located in >> the same >> directory as the Foo build.xml file (see Directory Layout below) >> >> I had thought that "dir" attribute of the "ant" task would change the >> current directory context for scripts as well as the build.txt file. >> It seems to me as if the "dir" attribute of the "ant" task in my >> top-level build file does not change the working dir for the jyhon >> script. Does this make sense? >> >> Any suggestions? Thank you in advance. >> >> -Sol >> >> >> My build.xml target to build 3rd party project >> =============================== >> >> >> >> >> >> Directory Layout >> =========== >> ./build.xml #my top-level build file >> ./foo/buildscripts/build.xml #3rd party build file >> ./foo/buildscripts/buildUtil.py #jython script >> ./foo/buildscripts/lib/pyLib.zip #jython library >> >> >> 3rd Party Target (from ./foo/buildscripts/build.xml) >> =========== >> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org