Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Location attribute in property not resolving correctly

Location attribute in property not resolving correctly

2006-09-26       - By Dominique Devienne
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

> that's the reason i _always_ use the unix style ' / '
> although i'm running on windows.

Yes, that what I recommend as well.

> if you use a path on a windows machine, f.e. :
> the path in the file you echoed to looks like :
>       C:\the\path\to\something
> the windows path separator is used as you are running on windows
>
> so if you try to load that file as property later, you have to go like
> that =
>
> <loadfile property="ordertxtfile" srcfile="C:/cc_workdir/temp.order">
>        <filterchain> <replacestring from="\" to="/" /> </filterchain>
> </loadfile>

I'd recommend to use <pathconvert> before the <echo>, rather than a
filter chain with <loadfile>. In fact, since you are not echo'ing out
a properties file it seems, you could even do the direct <echo> and
use <pathconvert> after the <loadfile> as well, because <loadfile> is
not affected with baskslash-based escape sequences. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.