|
Thank you to all that have responded. It has been very helpful!!!
cheers, rk~ From: Bill Martin [mailto:[EMAIL PROTECTED] Sent: Sun 6/11/2006 1:08 PM To: Robert Kolev; [email protected] Subject: RE: [NAnt-users] Nant newby question... Hi Robert.
NAnt handles this slightly differently to Ant. With Nant, you use the <include> task which is basically the same as <import> in Ant to include another build file. This can contain properties, scripts, targets etc. Basically, you need to set up a .build file with all your properties in, defined in a <project> tag and include this file in the main script. i.e.
<project name=”my.project”> <include builtfile=”properties.build”/> </project>
And then your properties,build file would be something like:
<project name=”properties”> <property name=”dev.machine” value=”MachineName” /> <….etc…. /> </project>
HTH,
Bill
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Kolev
Greetings all, I am looking into using NAnt as we are looking into some .NET development… currently we are using Ant since we are a java shop. With that said, I am looking into how / what is available in Nant and how to proceed with structure of the projects / build scripts / targets / tasks etc… and one of the first thing I noticed is that I am unable to specify a property file just <property name=”SomeProperty”/> within the .xml files. (it looks like property task does not support it. As I further looked into global properties and it referenced me to one of the nant config files which I don’t think I want to use.
So my question is, is there a way to have a global property file that defines all of my key’s associated to a project and when executing it via build or deployment to load it up and use it vs. having all the key’s defined in the actual build.xml?
For example contents in build.properties: ********** dev.machine=MachineName environment.type=dev project.mode.=nightly root.path=SomePath dist.path=SomePath etc… ********* within build.xml file to have <property file="build.properties"/>
For example: ********* <project name="ProjectName" default="main">
<!-- ===================== Initialize Property Values ================== --> <property file="build.properties"/>
<!-- ===================== Main Target ================== --> <target name="main" depends="clean, build, deploy, test"/>
<!-- ================== CLEAN: Clean output directories ================ --> <target name="clean"> <delete dir="${dist.path}"/> <mkdir dir="${dist.path}"/> </target>
</project> ********** Thank you for your help
Cheers, rk~ +++++++++++++++++++++++++++
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential privileged and/or exempt from disclosure under applicable law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential privileged and/or exempt from disclosure under applicable law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. |
_______________________________________________ NAnt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users
