ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Schaefer" <don_schae...@xelus.com>
Subject Re: properties from file and dos file paths
Date Thu, 31 May 2001 19:20:46 GMT
for the moment I use "replace" after creating the file.  This changes my "\"
to "/".  This gets me past the present issue.

Don Schaefer wrote:

> 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, test.properties:
>
> adir=d:\testdir
>
> and the following buildfile:
>
> <project name="test" default="build" basedir=".">
>     <property file="test.properties" />
>     <target name="testmd"> <mkdir dir="${adir}/foo" /> </target>
> </project>
>
> I get the following error when I run the build:
>
> G:\src>ant -buildfile test.xml testmd
> Buildfile: test.xml
>
> testmd:
>
> BUILD FAILED
>
> G:\src\test.xml:11: Directory G:\src\ estdir\foo creation was not
> succesful for an unknown reason
>
> Total time: 0 seconds
> G:\src>
>
> 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,
> don.


Mime
View raw message