Chris Holt wrote:
I’m a newbie so forgive the uncertainty.
Is this how you would conditionally set a property via environment
variable:
<property name=”myProp” value=”defaultVal” />
<if test="${environment::variable-exists('MYENVVAR')}">
<property name=”myProp”
value=”${|environment::get-variable(|‘MYENVVAR’|)}” />|
</if>
The text version of your email looks right. The HTML version looks as
though your editor thought it was doing you a favor by translating ASCII
quotes into left and right quotes, at least on the second occurrence of
MYENVVAR, but that's presumably just in the email, not the real build file.
There is a significant gotcha: variable-exists and get-variable are case
sensitive, which means you need to be sure about the case of the
environment variable.
I suggest setting up a toy build file to try out things like this. Once
you have the file, it's no more work to use it for questions like this
than it is to send the email, and you'll get a reliable answer sooner.
Use the <echo> task and/or the -v (verbose) option to see what NAnt is
really doing.
Gary
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users