Thanks Bill, It worked at last!
Thanks to Luis too for the classpath suggestions. Rgds, Vinod. -----Original Message----- From: Bill Rich [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:24 PM To: 'Ant Users List' Subject: RE: Problem to set property with refid Hi Vinod, add something like this to your ant file <!-- Set up the environment. --> <property environment="env"/> <!-- Set up the tasks that will be needed from the ant-Contrib package. --> <taskdef resource="net/sf/antcontrib/antcontrib.properties"> <classpath> <pathelement location="${env.ANT_CONTRIB_JAR}"/> </classpath> </taskdef> I have a system environment variable (ANT_CONTRIB_JAR) set to point to my Ant-contrib jar file. HTH Bill Bill Rich Wilandra Consulting LLC 1325 Addiewell Place San Jose, CA 95120-3905 phone: +1 408 268-2452 mobile: +1 408 410-9713 Santa Cruz: +1 831 464-9007 fax: +1 413 669-9716 [EMAIL PROTECTED] or [EMAIL PROTECTED] http://www.wilandra.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:20 AM To: [EMAIL PROTECTED] Subject: RE: Problem to set property with refid Hi Bill(Gates!?) I downloaded the ant-contrib-1.0b1.jar and placed in the ant classpath as below.. Still it is giving the same message. Any idea why its happening? ANT_CLASSPATH=$ANT_HOME/lib/ant.jar:$ANT_HOME/lib/ant-launcher.jar:$ANT_HOME /lib/xercesImpl.jar:$ANT_HOME/lib/xml-apis.jar:$WLS_HOME/lib/ant-contrib-1.0 b1.jar:$JAVA_HOME/lib/tools.jar (All the paths 100% exists) Thanks in advance, Vinod. -----Original Message----- From: Bill Rich [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 9:14 PM To: 'Ant Users List' Subject: RE: Problem to set property with refid The For task is in the Ant-contrib package. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 7:52 AM To: [EMAIL PROTECTED] Subject: RE: Problem to set property with refid Hi Neta, Is 'for' task is not part of Ant 1.6.1 distribution? I got this error when included the task in build.xml BUILD FAILED /products/proj/pisars/dist/build.xml:508: Could not create task or type of type: for. Ant could not find the task or a class this task relies upon. Rgds, Vinod. -----Original Message----- From: Neta Bar Tal [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 18, 2004 10:04 PM To: Ant Users List Subject: RE: Problem to set property with refid Hi Jan You are right I fixed it that way so now it works for <for> task...:-) <for list="${dynamics}" delimiter=" " param="dir"> <sequential> <path id="[EMAIL PROTECTED]"> <fileset dir="${env.CCWSCA}/@{dir}"> <include name="*.java" /> </fileset> </path> <property name="[EMAIL PROTECTED]" refid="[EMAIL PROTECTED]"/> <echo>the sources are [EMAIL PROTECTED]</echo> <echo>compiling package:@{dir}</echo> <javac debug="${env.JAVA_DEBUG}" destdir="${env.CCWPA}/classes" failonerror="false" includeantruntime="false" listfiles="no" optimize="on" srcdir="${env.CCWSCA}"> <include name="@{dir}/*.java" /> <classpath path="${classpath}"/> </javac> </sequential> </for> Neta Bar-Tal * 972-9-7960521 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday: May 18: 2004 7:27 PM To: [EMAIL PROTECTED] Subject: RE: Problem to set property with refid You can�t use <property> inside a <for>, because properties are immutable. If you use <foreach> it could be work... Jan > -----Original Message----- > From: Neta Bar Tal [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 18, 2004 6:21 PM > To: Ant Users List > Subject: Problem to set property with refid > > > > Hi all, > I'm trying to do the following: > > > <for list="${dynamics}" delimiter=" " param="dir"> > <sequential> > <path id="sources.path"> > <fileset dir="${env.CCWSCA}/@{dir}"> > <include name="*.java" /> > </fileset> > </path> > <property name="sources" refid="sources.path"/> > <echo>the sources are ${sources}</echo> > > > > <echo>compiling package:@{dir}</echo> > <javac debug="${env.JAVA_DEBUG}" destdir="${env.CCWPA}/classes" > failonerror="false" includeantruntime="false" listfiles="no" > optimize="on" srcdir="${env.CCWSCA}"> > <include name="@{dir}/*.java" /> > <classpath path="${classpath}"/> > </javac> > </sequential> > </for> > > > > > I'll explain - i'm iteraring over all my packages and run the <javac> > command for each package. > I want to set the property ${sources} to see if there are java files > in it and run it only if there are files. > the output is: > > > compile_packages_job: > [depend] Deleted 325 out of date files in 19 seconds > [echo] the sources are > [echo] compiling package:amdocs > Overriding previous definition of reference to sources.path > [echo] the sources are > [echo] compiling package:amdocs/csm3g Overriding previous > definition of reference to sources.path > [echo] the sources are > [echo] compiling package:amdocs/csm3g/sessions > > > > can you please help me with this issue? > netaB > > > > > > > > The information contained in this message is proprietary of Amdocs, > protected from disclosure, and may be privileged. > The information is intended to be conveyed only to the designated > recipient(s) of the message. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > use, distribution or copying of > > this communication is strictly prohibited and may be unlawful. > > If you have received this communication in error, please notify us > immediately by replying to the message and deleting it from your > computer. > Thank you. > The information contained in this message is proprietary of Amdocs, protected from disclosure, and may be privileged. The information is intended to be conveyed only to the designated recipient(s) of the message. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
