Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 46619 invoked by uid 500); 22 Oct 2001 08:16:26 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 46610 invoked from network); 22 Oct 2001 08:16:26 -0000 Message-ID: <004501c15ad1$8a279880$0100a8c0@jose> From: "Jose Alberto Fernandez" To: References: <01102001454804.01081@localhost.localdomain> <3BD147EB.BF3A80D1@sun.com> <01102118024300.01087@localhost.localdomain> Subject: Re: [PATCH] basedir for child project not set correctly from task Date: Mon, 22 Oct 2001 09:14:14 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This really looks like a bug to me. After all if you really want to = change the basedir you can always say: which by definition should take precedence over basedir as defined in = the buildfile. Passing "dir=3D'somedir'" should be just a shortcut for = "file=3D'somedir/build.xml'" which should be equivalent to executing "ant -f fullpath/somedir/build.xml". Jose Alberto ----- Original Message -----=20 From: "David Sitsky" To: Sent: Sunday, October 21, 2001 10:40 PM Subject: Re: [PATCH] basedir for child project not set correctly from = task > > - if you pass dir=3D"...", that is the basedir you will get; this is > > documented in the page, though it should be emphasized there = that > > the subproject's basedir attr is ignored > > > > - (note that the default script is then ${thatdir}/build.xml--docs = say > > default is "build.xml" but do not clarify that this is relative to = the > > passed-in dir) > > > > - if you pass antfile=3D"...", you can specify e.g. = "zotdir/build.xml" but > > then the basedir is inherited from the current project (!) > > > > - you can pass both if you want > > > > As far as I can tell, there is no way to do the thing which I at = least > > would 95% of the time want to do: run a specific build script and = ask Ant > > to give it the basedir it specifies for itself (without hardcoding = this > > into the calling script). >=20 > I would have thought this is what most users would be wanting too. = For all=20 > of my own "nested" buildfiles, I had basedir=3D"." and always called = them=20 > using the "dir" attribute in the task. I didn't realise basedir = in the=20 > nested task is ignored in this circumstance (my fault for not reading = the=20 > manual properly). >=20 > I came across this situation, because I was calling a third-party=20 > component (src/build/build.xml in their distribution) with their own = build=20 > file that set "../.." as their basedir. >=20 > I find it a little odd that I need to have knowledge of a build file's = > basedir and set it appropriately in the _calling_ buildfile in order = to call=20 > it properly. If the distribution build file changes their basedir, it = means=20 > all build files which call it also need to be changed. >=20 > Thanks for the explanation. >=20 > Cheers, > David >=20