Thanks Bonio,

I was already doing a secondary build script to call from the original build
file using the "exec" task, but there were too many properties to and task
loaded on the original build file that i had to pass to the other build
script...

Using the nant task the properties and task loaded are usable from the
secondary build script.

Easy an nice solution, it works.

Thanks.

On 28/02/07, Bonio Lopez <[EMAIL PROTECTED]> wrote:

 Hi Ricardo,
try following:
1. put a small nant build file my_build.build in the directory_you_need.
2. In the top nant script write
  <nant target="${target::get-current-target()}">
      <buildfiles>
        <include name="directory_you_need//my_build.build " />
      </buildfiles>
    </nant>


Now ${project::get-base-directory()} will be directory_you_need inside of
my_build.build. I am wondering, why nant works like this.Personally I
would prefer that ${project::get-base-directory()}  would stay a location of
the topmost nant script (as it is when <include> used). But for you this
behavior seems to be a rescue :).

Best regards,
Boni
 ------------------------------
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Ricardo Lopes
*Sent:* Mittwoch, 28. Februar 2007 13:37
*To:* Gert Driesen
*Cc:* nant-users@lists.sourceforge.net
*Subject:* Re: [NAnt-users] Change basedir for target

I tried, but the cd didn't worked. It has to be basedir.

Thanks anyway.

On 28/02/07, Gert Driesen < [EMAIL PROTECTED]> wrote:
>
>
> ----- Original Message -----
> From: "Ricardo Lopes" < [EMAIL PROTECTED]>
> To: "Gert Driesen" <[EMAIL PROTECTED]>
> Cc: < nant-users@lists.sourceforge.net>
> Sent: Wednesday, February 28, 2007 12:18 PM
> Subject: Re: [NAnt-users] Change basedir for target
>
>
> > Good question, i don't want to change the basedir, it is a workaround.
>
> >
> > I have to call a custom task (that i don't have the source of) that
> relies
> > that some files are on a given location inside the base directory.
> >
> > But i want to change organize those files inside a folder, so i was
> > thinking
> > at the start of the target change the basedir to that folder and
> restore
> > the
> > basedir at the end of the target.
> >
> > Is not good lucking i know, it would be better to add a param to the
> task,
> > but i don't have the source code.
>
> Are you sure it relies on these files to be inside the base directory,
> and
> not the current directory ?
>
> If it's the current directory, then you could use the <cd> task in
> NAntContrib to modify it.
>
> Gert
>
>


--

Ricardo Lopes




--

Ricardo Lopes
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to