ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Stark <sst...@us.ibm.com>
Subject Re: Newbie question: importing properties from XML file via command line
Date Mon, 14 Sep 2009 17:03:59 GMT
Joe wrote:
> That's not correct: ant properties in the file are expanded inline.
> See http://ant.apache.org/manual/CoreTasks/property.html for details
> (I don't know about ${file.separator}, though)

I see that in the documentation; however it's not working for me.

My properties file:
script_dir=C:\\working\\scripts;
test_Dir=${script_dir}\\myDir

My target:
<target name="propstest">
 <echo>script_dir property: ${script_dir}</echo>
 <echo>test_Dir property: ${test_Dir}</echo>
</target>

My output (ant -f test.xml -propertfile test.properties propstest

propstest:
     [echo] script_Dir property: C:\working\scripts
     [echo] test_Dir property: ${script_dir}\myDir

Am I doing something wrong? This is on Windows XP by the way.

> The import tag can use property expansion too. If you don't want to
> hard-wire the file you import, you can use a property. e.g.

Yes that works, thanks! Still like to figure out why the other ain't
working, though...

Scott

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message