ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: how to check that a property exist
Date Thu, 12 Jun 2008 15:32:38 GMT
Patrizio.Ferlito@b-source.ch schrieb:

> but I don't know how to use it.
> My ant version is: Apache Ant version 1.6.5 compiled on June 2 2005 and
> I read that script task depends on external libraries not included in
> the Ant distribution.

it's only the BeanScriptingFramework = bsf.jar and
the language specific jar, f.e. jruby.jar ...

> So I choose the "lowlevel" approach:
> 
> <echo file="tmp.properties">pollerValue=${pollerValue}</echo>
> 
> The properties file is created:
> 
> /tmp> cat tmp.properties 
> pollerValue=bnk01alm01
> 
> but then
> 
> <property name="pollerValue"   value="${pollerValue}"
> file="tmp.properties"/>
> 
> doesn't work. I'm trying to understand why ...

the property task has not attribute value

<property file="tmp.properties"/>

loads your propertyfile, then

<echo>$${pollerValue} == ${pollerValue}</echo>

will work.

See also =
http://ant.apache.org/manual/CoreTasks/property.html
http://ant.apache.org/manual/CoreTasks/loadfile.html
http://ant.apache.org/manual/CoreTasks/loadproperties.html


Regards, Gilbert

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


Mime
View raw message