ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Hassan" <>
Subject RE: scope of property
Date Thu, 30 May 2002 16:54:56 GMT
> Properties in Ant don't really have "scope" -- once a property is set,
> it's available throughout the project (it was set in).
> Diane

Sounds good, but...

Assume I have two projects:


  <!-- versioning.xml-->
  <project name="versioning" default="" basedir=".">
   <target name="get_version">
      <property name="build.version" value="1.0"/>
      <echo message="Setting version=${build.version}"/>


  <!-- build.xml-->
  <project name="build" default="test" basedir=".">
   <target name="test">
      <ant antfile="versioning.xml" target="get_version"
	<echo message="Build version: ${build.version}" />

'get_version' sets ${build.version}, but it does not updated in

Is it correct to assume that properties from a parent project are available
to the child project (project called using <ANT>), but not vice versa... ???
If so, how can I return a value to a calling project?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message