ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Schaefer" <>
Subject properties from file and dos file paths
Date Tue, 29 May 2001 19:06:46 GMT
When I read in a set of properties from a file it looks like dos file
separators are applied as escape chars.  For example if I have the
following file,


and the following buildfile:

<project name="test" default="build" basedir=".">
    <property file="" />
    <target name="testmd"> <mkdir dir="${adir}/foo" /> </target>

I get the following error when I run the build:

G:\src>ant -buildfile test.xml testmd
Buildfile: test.xml



G:\src\test.xml:11: Directory G:\src\ estdir\foo creation was not
succesful for an unknown reason

Total time: 0 seconds

Note the space before "estdir".  It should be "testdir".  I think that
the \t is being treated like a tab.  If I change the '\' to '/' then all
is well.  I was just looking at the doc and see that it refers directly
to the java.util.Properties class.

The problem is that the directories that I wanted to work with are
derived fom basedir and java.home wich report back with g:\..\...  I can
ask the users not to use '\' but basedir comes from ant.

Thanks for your help,

View raw message