Hi,

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

so if writing =

dir.src=C:/Temp/compare_cmp
dir.dest=C:/Work/Dev/projects/Installer/code/Installer_c1.0.latest/cmp

it works.

also i write

//servername/...

instead of

\\servername\...


and there is more of that =

if you use a path on a windows machine, f.e. :

<path id="path.order">
            <fileset dir="${foobar}">
                <include name="*.txt" />
            </fileset>
        </path>
        <timestampselector property="order.candidate"
                           pathref="path.order"
                           count="1"
                           age="eldest">
        </timestampselector>

<echo file="C:/cc_workdir/temp.order">${order.candidate}</echo>

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>

or 
...
<replacestring from="\" to="\\" />
...

otherwise it shows the behaviour you already stumpled upon


Regards, Gilbert
 

-----Original Message-----
From: William Lopez [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 25, 2006 9:38 PM
To: user@ant.apache.org
Subject: Location attribute in property not resolving correctly

Ant: 1.6.5
Java: 1.5.0_07
OS: WinXP
 
I have a build.properties with the following props defined:
 
dir.src=C:\Temp\compare_cmp
dir.dest=C:\Work\Dev\projects\Installer\code\Installer_c1.0.latest\cmp
 
The build is failing because the props are being resolved without the
backslashes. Here are the <echo>s:
  [echo] Source:C:Tempcompare_cmp
  [echo] Target:C:WorkDevprojectsInstallercodeInstaller_c1.0.latestcmp
 
I'm stumped.
 
Thanks,
-Will
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to