ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yaron Ruckenstein" <>
Subject Ant task with nested property problem
Date Mon, 17 Mar 2003 17:28:46 GMT

I have two Ant scripts that both except to get the property "param.project" 
thought the command line, and one of them is calling the other, in the following way:

<ant antfile="v:\bin\compile.xml" target="compile" inheritAll="false">
	<property name="param.project" value="${current.project}"/>

(I'm using ant1.5.2 with jdk1.4.1_01, and this problem occurs inside a foreach loop).

My problem is that the value that is passed to the called ant file is not the 
value of ${current.project}, instead the calling script value is passed.

I know that property is not a variable, and once it is set, it cannot be changed,
but in this context I was excepting the value that is passed to the called script 
to be updated.

What can I do to solve my problem and get the values that I want passed ?

(I suppose I can change the names of the properties that the called script excepts,
 but then, will I be able to call it more that once? if the nested property serves as
 any other property task, then once it is set, it cannot be changed)

Thanks in advance,

View raw message