To reply to my own message (again)...which probably also resolves my other
issue regarding the include task.

It seems the include task is relative to basedir.  If you don't specify the
basedir property the default is to use the directory of the current build
file (thanks to the nant-users archive).  Removing the basedir property
fixed the include task problem and set the current directory correctly for
the called build file.


Darren

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Darren Syzling
Sent: 23 December 2002 23:19
To: [EMAIL PROTECTED]
Subject: [Nant-users] nant task and basedir property

I'm not sure I understand the relationship between the nant task and the
basedir property of the called build file.

If a top level build file calls a lower level build file using the nant task
and the called build file basedir is '.' any operations will be performed in
the current directory where Nant was invoked.

Let's say I have a top level build file:

Mytoplevel.build

And a directory called utils/zip under this hierarchy

Within utils/zip is a separate component build file called zip.build

The sub component wants to create build directories for targets obviously
within the utils/zip directory.  If I invoke NAnt using mytoplevel.build
which then calls down to the subcomponent the directories will be created in
the current directory - not in the utils/zip directory UNLESS I add:

<project name="My Zip" default="build" basedir="Utils/Zip">

With utils/zip in basedir of the subproject everything works.

However I'd rather the subcomponent not know what directory structure it's
within - it should be self contained.  I should be able to call the subbuild
and the basedir element should be relative to the build file itself.  This
was the general Java Ant behaviour.

Has this been changed or have I missed something?  BTW I'm using the latest
snapshot src build.


Darren



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to