-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2008 1:42 PM To: [email protected] Subject: RE: how to check that a property exist /* Hi Gilbert, issue ii) solved using macrodef: <target name="pollerEventIsSet-if" depends="check-pollerEventIsSet" if="pollerEventIsSet"> <macrodef name="propertycopy"> <attribute name="pollerEvent"/> <sequential> <property name="pollerValue" value="[EMAIL PROTECTED]"/> </sequential> </macrodef> <propertycopy pollerEvent="${IPEvent}.pollerManagedServer"/> <echo>pollerEventIsSet, pollerValue: ${pollerValue}</echo> </target> output: pollerEventIsSet-if: [echo] pollerEventIsSet, pollerValue: bnk01alm01 Any idea about issue i) ? */ issue ii) = i believe that's solution which is also listed in the ant faq as far as i remember issue i) the problem is you're using antcall which opens a new project scope means after antcall is through the project scope is gone and you don't get back anything to the calling target. therefore tasks like AntCallBack, AntFetch exist in antcontrib ;-) possible solutions = very lowlevel = echo value to a file and load it in the calling target /* thanks a lot for your hint but I would like to find a way without using antcontrib... */ go with antcontrib - i see you're already using it, as propertycopy is part of the antcontrib task suite ;-))) and adapt my snippet to your needs or finally - recommended - use <script> check your existing properties etc. ... set new properties you need for further processing via use of ant api <script/> Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
