I seem to be having some problems with the "if" attribute on a <target>.
I would like to execute the <target> if a specific property evaluates to
"true". I have the following:
<target name="db.init" if="${property::get-value(sql.init)}"
depends="db.create.tables, db.create.procs"/>
I then receive the following error message:
D:\Development\Projects\Library\Build\library.build(22,3):
Function call failed.
Expression: ${property::get-value(sql.init)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^:
NAnt.Core.BuildException:
D:\Development\Projects\Library\Build\library.build(22,3):
Function call failed.
Expression: ${property::get-value(sql.init)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---> Property 'false' has
not been set.:
NAnt.Core.BuildException: Property 'false' has not been set.
at NAnt.Core.ExpressionEvaluator.EvaluateFunction(String
functionName, Object[] args)
at NAnt.Core.ExpressionEvalBase.ParseValue()
--- End of inner exception stack trace ---
at
NAnt.Core.PropertyDictionary.EvaluateEmbeddedExpressions(String input,
Location location, Hashtable state, Stack visiting)
at NAnt.Core.Target.get_IfDefined()
at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies)
at NAnt.Core.Project.Execute()
at NAnt.Core.Project.Run()
How do I get a target to execute based on a value of a specific
property?
I'm using Nant 0.85.
Thanks
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users