Brenton House wrote:

As a former Jakarta Ant user, I am always migrating scripts from Ant to NAnt as I am porting code from Java to C#. I am curious why the Property Task does not have the attribute “File” for loading properties from a text file. (http://ant.apache.org/manual/CoreTasks/property.html) I know that NAnt is based on Jakarta Ant and I thought that most of the functionality was brought over as well. If the reason is simply that no one has done it, I will contribute and add that to it. If there is another reason, I am just curious what it is.

With NAnt the <import> task is the preferred means to import a large set of properties. The import task pulls in an included build file where you can define common properties using the <property name="foo" value="bar /> syntax.

The reasons for not adding the ability to load a properties from the property task are:

1) the use .properties files containing name, value pairs is not a .net idiom the way it is in java and:
2) having a task thats named <property> also meaning loadproperties in some circumstances is a little confusing
3) the import task gives you the same functionality and more and ensures that all property definitions take the form :
<property name="foo" value="bar />


This should probably be added to the FAQ.

Ian




------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to