Hello, --- Radha Sangal <[EMAIL PROTECTED]> wrote: > Tried this .. > > <property name="DevBuild1" value="($DevBuild1)"/> > <property name="DevBuild2" value="($(DevBuild2)))"/>
Well, this is not the exact syntax. I would try with <property name="DevBuild1" value="${DevBuild1}"/> <property name="DevBuild2" value="${DevBuild2}"/> This is the correct way of referencing properties. In your case, however, the above two lines are redundant if you pass the arguments correctly. Ant accepts properties like this ant -f your_build.xml -DyourTag1=value1 -DyourTag2=value2. Next, agruments are passed to .bat files in the following way your_file.bat tag1 tag2 and are accessed in the very bat file with %1 %2, so your call to ant becomes ant -f your_build.xml -DyourTag1=%1 -DyourTag2=%2. HTH Ivan > <echo message="Starting CVS Difference Report > (${DevBuild1} > to${DevBuild2})"/> > > Got this .. > > manualDiff: > [echo] Starting CVS Difference Report > (($DevBuild1) to > ($(DevBuild2)))) > > -----Original Message----- > From: Chaganthi, Madhusudan R. [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, January 11, 2005 10:33 AM > To: Radha Sangal > Subject: RE: passing parameters to ant > > <property name="DevBuild1" value="$(DevBuild1)"/> > > It looks like the braces should be around the $ too. > <property name="DevBuild1" value="($DevBuild1)"/> > > > -----Original Message----- > From: Radha Sangal [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 11, 2005 10:31 AM > To: Ant Users List > Subject: passing parameters to ant > > > This might be a silly mistake, so I m asking for few > more eyes to see > it. Please help! > > > > We have an xml-rpc client calling a method on the > server which executes > the following bat file. > > > > Command line from "automated_Builds_Diffs.bat" > > cmd /c ant -buildfile > D:\v04_E\Build_Scripts\CvsDiffReports\automated_cvsdiffs.xml > manualDiff > -D DevBuild1=$1 -D DevBuild2=$2 > D:\test2.txt > > > > ($1 and $2 are passed from the client and are tested > to have the right > value at run time) > > > > Ant script "automated_cvsdiffs.xml" receiving these > parameters: > > <target name="manualDiff"> > > <!-- TO use manual diff, set > the build names > below. This targets DEV build only --> > > <property name="DevBuild1" > value="$(DevBuild1)"/> > > <property name="DevBuild2" > value="$(DevBuild2)"/> > > <echo message="Starting CVS > Difference Report > (${DevBuild1} to ${DevBuild2})"/> > > > > Output as in test2.txt : > > manualDiff: > > [echo] Starting CVS Difference Report > ($(DevBuild1) to > $(DevBuild2)) > > > > Script is failing here; the parameters are not > getting populated. I have > tried some combinations like changing the names > etc., but of no use. > > This is some small syntax which I am probably not > able to see here. > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]