Gert Driesen wrote:

don't support the basedir property.

Ahh pity.  From an academic, developer to developer point of view I'm
curious why that decision was made.  I'm just wondering because
obviously that's a big decision since many existing Ant scripts use
${basedir} as a property and it must have been a conscious decision to
break the interface.  Obviously a lot of thought must go into each
decision that breaks simple compatibility with the original Ant since
by the nature of calling it "NAnt" it implies a certain compatibility.
At some point I'm sure someone said, "Ok, Ant does it this way but I
don't think NAnt should because (fill in blank)"  It's that fill in
the blank part I'm after.


I definitely agree that compatibility with Ant would've been nice.
However, I wasn't involved in NAnt when some of these decision were made.
come on - you can find a better example of incompatability than this one :) . basedir vs nant.project.basedir is hardly a huge difference and as far as I'm aware this is the first time this has been brought up as an issue. If it had been that important to a majority of NAnt users then it surely would have been changed years ago.

You should either use the project::get-base-directory() or the
nant.project.basedir property


Thanks for the advice but I think I'll stick with Ant.  Too many
scripts use ${basedir} and I don't want to convert all of those that
do to use the NAnt proprietary "project::get-base-directory()" or
"nant.project.basedir".  We share these admin-style scripts and I
don't want to force others to use nant just to work around this issue.

Proprietry ? its not proprietary its just different. In the online docs there is a section for "Ant Users" which says :

"If you have used Ant before than NAnt should feel comfortable but NAnt is only compatible with Ant in spirit." - ie its not meant to be an exact clone of Ant. However on a more positive note - its easy enough to add a basedir property thats an alias for project::get-base-directory(). Just add the following property definition to NAnt.exe.config

... from line 1095 or so
   <properties>
<!-- properties defined here are accessible to all build files -->
          <!-- <property name="foo" value = "bar" readonly="false" /> -->
<property name="basedir" value = "${project::get-base-directory()}" readonly="false" /> </properties>
  </nant>
  ...

and the basedir property will become available to all scripts. Of course you'd need to make this change in NAnt.exe.config on every developers machine but thats less work than changing all your buil scripts.

Ian







-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to