ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <angesh...@yahoo.com>
Subject How to set global properties?
Date Mon, 02 Aug 2004 12:29:45 GMT
How to set global properties?

Hi I have a build files as follows

<?xml version="1.0"?>
<project default="site" basedir="." name="forrest">
<property name="version" value="0.5"/>

<taskdef
resource="net/sf/antcontrib/antcontrib.properties"/>
	<target name="init-props">
		<foreach list="logging,appintegration"
param="archive" target="base">  
		</foreach>
....
....
<property name="forrest.home"       
location="../setup" />
<property name="project.name"       
value="my-project"    />
<property name="project.build-dir"  
location="${project.home}/build"    />
....
....
<antcall target=...../>
</target>

<target name=...../>
....
....
<antcall target=...../>
</target>

<target name=...../>
....
....
</target>

<target name="base" >
<property name="current.archive" value="${archive}" />
</target>

</project>

Now I want the content or value of ${current.archive} 
or ${archive} to be available inside all the other 
ant targets as well.

i.e. I should be able to use the ${archive} and
${current.archive} in other targets also like

<target name=...../>
....
<property name="project.site-dir" 
location="${project.build-dir}/test/report/html/{archive}"
   />
....
</target>

How can this be set? Somebody suggest some soltion.

bye,
with regards,
Deepak.


		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

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


Mime
View raw message