ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CAMPANA,SAL (HP-Philadelphia,ex1)" <sal_camp...@hp.com>
Subject using properties files
Date Wed, 03 Oct 2001 13:47:55 GMT
I have been playing with using properties files for passing variables into
my ANT scripts.

Is there a way to pass in a property which has spaces?

i.e.

name=John Smith

I've tried using quotes (i.e. name="John Smith") , but then the quotes are
in the variable....

Is there another way? Or a way to strip the quotes from the variables??

Thank you!!

Ant script:

<?xml version="1.0"?>
<project name="test" basedir="." default="echo">


<target name="init"> 
  <property file="c:/ant/bin/some.properties"/>
</target> 

<target name="echo" depends="init"> 
       <echo message="${name} was here"/>
</target> 

</project>

Mime
View raw message