Hi Brian,

You need to use the <include> task.  Your properties file must contain a
<project> definition e.g.

<project name="properties">
        <property name="prop1" value="val1" />
        <property name="prop2" value="val2" />
</project>
and save as properties.build.

Then in another file build file you can use:

        <include buildfile="properties.build" />

Cheers,

Bill


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Brian Cantoni
Sent: 03 May 2005 18:36
To: [email protected]
Subject: [Nant-users] NAnt equivalent to Ant's <property file="xyz">

I've been using NAnt for a few weeks and have migrated our
Win32 app build to it. I'm looking for a way to load a set
of properties from an external file, similar to Ant's
<property file="xyz"> method.

NAnt's <property> does not allow files as a source, so I'm
curious what others have done for this type of solution?

Ant seems to be able to read files like this:

   # comment
   Property1=Value1
   Property2=Value2
   etc.

It seems that creating a custom task or script would work.
Does anyone have an example they'd care to share?

thanks,
brian

--
Brian Cantoni <www.cantoni.org>



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users


UK businesses use 2 million tonnes of paper each year.
THINK before you PRINT this email.
______________________________________________________________

CONFIDENTIALITY NOTICE

This communication and the information it contains is intended for the person 
or organisation to 
whom it is addressed.  Its contents are confidential and may be protected in 
law.  Unauthorised use,
 copying or disclosure of any of it may be unlawful.  If you are not the 
intended recipient, please 
contact us immediately.

The contents of any attachments in this e-mail may contain software viruses, 
which could damage your 
own computer system.  While Marlborough Stirling has taken every reasonable 
precaution to minimise 
this risk, we cannot accept liability for any damage, which you sustain as a 
result of software 
viruses.  You should carry out your own virus checking procedure before opening 
any attachment.

Marlborough Stirling plc, Registered in England and Wales 
Registered No. 3008820,
Jessop House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH
Tel: 01242 547000     Fax: 01242 547100
http://www.marlborough-stirling.com

N¬HS^µéX¬²š'²ŠÞu¼"ì†jg¬ër¢êßx®Éb™·«yÛjw`Š÷¢·*.­·¬¶Èh·ˆ+y«^½éí)¦Šíºx­‰ë-£§n(Š^²Û¢·°Š{
"ì†jg¬>V²¶Œ"©Í.µ¦V¬™§b²™ZÉX¬ŠØm¶ŸÿÃ'yÈ‚ìoë

Reply via email to