You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nagarajan Murugesan <NM...@Selectica.com> on 2003/12/12 14:59:04 UTC
Scope of the ANT property!!!
Hi All,
What is the scope of the property value in a build file.
I want to change the property value in between the build process.
For Example:
project name="Installation" default="run">
<target name="run">
<property name="count" value="I"/>
<echo>${count}</echo>
<property name="count" value="II"/>
<echo>${count}</echo>
</target>
</project>
But in both the echo command it gives the same value. Is there a way to
change property value?
Thanks,
Nagarajan
Re: Scope of the ANT property!!!
Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Properties once set cannot be changed with the <property/> task.
Ant-Contrib or Antelope has a variable task which allows to change values.
But maybe there is a proper way of doing what you want to do with ant.
Antoine
Nagarajan Murugesan wrote:
>Hi All,
>
>What is the scope of the property value in a build file.
>I want to change the property value in between the build process.
>
>For Example:
>
>project name="Installation" default="run">
>
> <target name="run">
>
> <property name="count" value="I"/>
> <echo>${count}</echo>
>
> <property name="count" value="II"/>
> <echo>${count}</echo>
>
>
> </target>
></project>
>
>But in both the echo command it gives the same value. Is there a way to
>change property value?
>
>Thanks,
>Nagarajan
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org