ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casey Daniell <CDani...@realm.com>
Subject RE: passing Ant property values to new build
Date Fri, 05 Nov 2004 17:11:00 GMT
Jan, 
     
Yep, its set in the calling ant file, 
[echo] ${tools.home}=C:\LATEST_CODE\tenant/../tools

and not properly set in the ant script that is called.
[echo] ${tools.home}=${tools.home}

However, I found a solution, doing the following fixed 
my problems. 

<subant buildpath="common/build.xml" target="dist" inheritAll="false" >
   <property name="tools.home"  value="${basedir}/../tools" />
   <property name="stack.home"  value="${basedir}/../stack" />
</subant>

for some reason if I pass in a value that is the same as the 
property name I am trying to use it doesn't evaluate the var 
properly. A bug perhaps? I am using ANT 1.6.2

Thanks for the help
Casey

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Friday, November 05, 2004 10:47 AM
To: user@ant.apache.org
Subject: AW: passing Ant property values to new build


Is the property set? Do a 
  <echo>$${tools.home}=${tools.home}</echo>
directly before the <subant>.

Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Casey Daniell [mailto:CDaniell@realm.com]
> Gesendet am: Freitag, 5. November 2004 17:45
> An: 'user@ant.apache.org'
> Betreff: passing Ant property values to new build
> 
> All,
> 
> I am a long time ant user but for some reason I am stumped on 
> this, maybe 
> its too early in the morning.
> 
> Here is the problem. I am have one ant script calling another 
> via the ant 
> task. I want the value of a property to be transmitted to the 
> new build not
> the string literal itself.
>  
> Ex.
>    basedir == /foo (not in any syntax)
> 
>    <property name="tools.home"  value="${basedir}/../tools" />
>    <property name="stack.home" value="${basedir}/../stack" />
> 
> ......
> 
>    <subant buildpath="common/build.xml" target="dist" 
> inheritAll="false" >
>       <property name="tools.home"  value="${tools.home}" />
>       <property name="stack.home"  value="${stack.home}" />
>    </subant>
> 
> 
> This code snippet sends ${tools.home} to the ant script that 
> is called not
> the 
> wanted /foo/../tools
> 
> How do I do this?
>  
> Much thanks,
> Casey
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message