ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neta Bar Tal" <NE...@Amdocs.com>
Subject RE: Problem to set property with refid
Date Tue, 18 May 2004 16:33:45 GMT

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="sources.path.@{dir}">
		      		<fileset dir="${env.CCWSCA}/@{dir}">
		      			 <include name="*.java" />
		      		</fileset>
		     	</path>
		    	<property name="sources.@{dir}" refid="sources.path.@{dir}"/>
		    	<echo>the sources are ${sources.@{dir}}</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

*netab@amdocs.com


-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Tuesday: May 18: 2004 7:27 PM
To: user@ant.apache.org
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:NETAB@Amdocs.com]
> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message