Gary Feldman wrote:
From: "Ian MacLean" <[EMAIL PROTECTED]>
Sent: Thursday, August 12, 2004 6:40 AM
Actually I don't see how adding property files is any different from
using the <include> task to import properties. And I don't see how it
There are a number of ways that the property mechanism in Ant is different from NAnt.
The most obvious is that the property file syntax is much simpler. This may
not seem like much, but not only does it make it easier to read the property
file, it also guarantees that the property file isn't doing anything funky
behind your back.
sorry - I don't buy it. Is
name=value really that much simpler than:
<property name="foo" value="bar" />
The <include> model has the advantages of being a single include mechanism and being able to cut and past property definitions directly from a build file into a common include file.
More functionally, in NAnt, include files can only be included at the topThis is true because included files can contain more than just property definitions. I don't feel that its a big handicap but others may disagree.
level. This means you can't have a target decided which of several property
files to load.
There are probably ways to work around this in NAnt, but that's just another complexity.
Related to property files, there are property sets. This makes it easier to treat properties as a group. The combination of property sets and property files makes it easy to pass different sets of properties to subtasks.
PropertySets look useful and shouldn't be too hard to implement for nant.
hmm - well you'll find varying opinions on this point. I've heard from lots of ex Ant users that they find immutable properties to be quite restrictive.
Also, in Ant properties are always immutable (i.e. readonly). The
evaluation order is well defined and the confusion over the property's value at any given time is reduced..
well - since its generally a good idea to only pass a small number of property values on the commandline I still don't see the advantages of using property files here. How is remembering a file path easier then remembering one or two property names ?
The way this affects the issue of properties on the command line is to encourage a simple consistent architecture. Instead of providing a number of properties on the command line, or having to remember the exact names and values for them, all the user really needs to do is to remember a set of file or directory names. This could be done in simple NAnt files using <include>, but as pointed out above, that's not as flexible. Either way, by relying heavily on property files, command line typos are found earlier (i.e. when the attempt to load the property file fails, rather than when a specific property is used).
Note that implementing a <antpropertyfile> task that loads properties from an Ant style property file would be a trivial exercise. I don't believe that such a task belongs in NAnt.core but theres nothing stopping you form building such a beast and maybe submitting it to NAntContrib.
Ian
------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
