ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: How do I get a property treated as a value rather than a location?
Date Mon, 24 Oct 2011 11:09:39 GMT
On 2011-10-24, twiddle-dee12 wrote:

> Hi,

> I'm not a particularly strong user of ant so please bear with me. Is there a
> way of getting a property in a property file treated as a value rather than
> a location? For example, I have the following:

> build.property:
> mytest.dir="/tmp/jon"

Are the quotes around /tmp/jon a typo?  You don't need quotes in
property files.

> <property file="build.property" />
> .
> <target name="fred">
>   <mkdir dir="${mytest.dir}" />
> </target>

> The directory ${mytest.dir} will be created where I am running the ant
> script from

This should not happen.  What is the literal value of ${mytest.dir} when
you <echo> it?  Since the value starts with a / Ant will know it is an
absolute path and things should work as you expect them.

Stefan

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


Mime
View raw message