reading NAnt properties from another file

  • Thread starter Thread starter con.brady
  • Start date Start date
C

con.brady

Hi Folks,

Disclaimer:
I apologize if this is the wrong place for this type of question, but
if so,
I don't know where the right place is and I'd be very grateful if
someone
could point me in the right direction.

Question:

I am new to using Nant (novice) and I am currently writing test build
scripts for our build process:
I want to be able to define a number of properties in one build file
and then read this in another build script.

An example would be:
"properties.build"

<property name="ApplicationName" value="MyApplication" />
<property name="version" value="1.1" />

Then in my main build script I would read "properties.build":

1. How do I read the file do I need to use <include>; if so in what
way?
2. When the file is read do I need to set each properties to an
individual scalar variable?

Thanks in advance
Cheers,
Con
 
I am new to using Nant (novice) and I am currently writing test build
scripts for our build process:
I want to be able to define a number of properties in one build file
and then read this in another build script.

An example would be:
"properties.build"

<property name="ApplicationName" value="MyApplication" />
<property name="version" value="1.1" />

Then in my main build script I would read "properties.build":

1. How do I read the file do I need to use <include>; if so in what
way?
2. When the file is read do I need to set each properties to an
individual scalar variable?

The NAnt docs has an example of include:

<include buildfile="GetProjectVersion.include" />

If all builds need them then you can put it in
nant.exe.config !

NAnt does not have file attribute on property tag, which is weird
because Ant has it.

Arne
 
Thansk for the feedback:
If all builds need them then you can put it in
nant.exe.config !

the nant.exe.config is ok but not good for multipe people accessing
code from a distributed environment....

Thanks again!

Con
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top