Thanks. I found that when I remove basedir="." from both my master and child
buildfiles the thinkgs started to go right.
Plus, I got another super-cool feature: the build is now independent of the
current directory. I can invoke it like

nant -f:z:\the\full\path\to\build\file.build

and it works!

BTW:

1. Is this basedir behaviour correct? Since all buildfile paths are relative
to *.build file, shouldn't you remove

basedir="."

from all examples and use only in special cases?

2. Now I encountered only one glitch with building from directory other than
the one containing *.build file. NDOC seems to have problems with
OutputDirectory setting which seems to be always relative to current
directory.
I found a way to overcome it:

                        <property name="OutputDirectory"
value="${nant.project.basedir}\doc\MSDN" />

and it works from any path now. Other tasks (<csc>, <copy>, <delete>) seem
to work perfectly when invoked from any dir.

Jarek
----- Original Message -----
From: "Scott Hernandez" <[EMAIL PROTECTED]>
To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 8:23 PM
Subject: Re: [Nant-users] <nant> task question


>
> Even tho the working directory does not do what you expect, <nant> does
> resolve relative paths/files to the directory of the child project. This
is
> so all you need to do is make things relative to the build file and NAnt
> does the rest. If this is not the behavior you are seeing you may want to
> post your build files.
>
> Take a look at examples and the individual sample build files. They show
how
> to use a simple master/child build relationship in separate directories.
All
> the file refs are relative to the child build file.
>
> If you really need the working directory set you can use <exec> with the
> workingdir attribute to run nant against your build files.
>
> ----- Original Message -----
> From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 04, 2003 1:41 AM
> Subject: [Nant-users] <nant> task question
>
>
> > Hi!
> >
> > I'm using NAnt 0.8.1.
> >
> > Is it possible to execute <nant> task so that the working directory for
> > sub-build would be
> > temporarily set to the directory where sub.build file is found?
> >
> > Ideally the usage would be:
> >
> > <nant buildfile="path_fo_file.build" setworkingdir="true" target="..."
/>
> >
> > which would:
> >
> > 1. Save current working directory
> > 2. Change the working directory to a directory where
"path_to_file.build"
> is
> > located
> > 3. Invoke sub-build
> > 4. Revert to saved working directory.
> >
> > This would allow both the master build file and child build files to
> contain
> > only relative
> > path names while allowing them to be built separately.
> >
> > I cannot find a way to implement this functionality with current NAnt.
I'm
> > not sure, but looking at src/NAnt.Core/Tasks/NAntTask.cs this looks like
a
> > small change that would optionally save and restore working directory
> around
> > "project.Run()" call at the bottom of the file.
> >
> > Regards,
> >
> > Jarek
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to