Hi all,

 

I’m trying to set dynamic properties in my build file as shown below:

 

<property name="idl.out.dir" value="${bin.root}\Common" dynamic="true" if="${string::contains(this.idl, 'Source\Common'}" />

<property name="idl.out.dir" value="${bin.root}\Data" dynamic="true" if="${string::contains(this.idl, 'Source\Data'}" />

 

Essentially, all idl’s under a specific source hierarchy (which is tested by the string::contains function) are compiled to a single bin directory.

 

However, in doing the above, I get the following error when running the build script:

 

Property evaluation failed.

_expression_: ${string::contains(this.idl, 'Source\Common'}

                                                 ^^^^^^^^

                         Property 'this.idl' has not been set.

 

It seems that even though a dynamic property is specified, the function tries to do an evaluation even before the property is being used, i.e., in this case, it is not dynamic.

 

Can anyone confirm this, or point out any problems in my approach, or possibly, a better way to do this.

 

Thanks,

Nick.

Reply via email to