You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Loughran <st...@apache.org> on 2007/04/02 11:54:29 UTC

Re: Mapped vs UNC

Robertson, Julie wrote:
> Yes, that will only create a folder on my machine in my Ant home.  I am using properties, I just pasted the path for the email to make it easier to explain.  I just tried it again to be sure.  Thanks for the help.
> 
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com] 
> Sent: Thursday, March 29, 2007 9:57 AM
> To: Ant Users List
> Subject: Re: Mapped vs UNC
> 
> usually read from a property in build.xml or .properties file
> 
> <property name="foo.dist" value="\\\\server\\resource\\directory"/>
> 
> then later on,,
>        <fileset dir="{foo.dist}">
>          <include name="*.zip"/>
>        </fileset>

> ----- Original Message ----- 
> From: "Robertson, Julie" <Ju...@conocophillips.com>
> To: <us...@ant.apache.org>
> Sent: Thursday, March 29, 2007 10:36 AM
> Subject: Mapped vs UNC
> 
> 
> I am working on an Ant build file that uses the ftp task to copy files
> to other servers.  My problem is I can get it to work fine by using a
> mapped drive, but when I try and use a UNC path, it just copies the
> folder structure and files to my Ant directory on my machine.
> 
> Works:
>  <ftp action="get"
>           server="${testServer}"
>           userid="${testUserID}"
>           password="${testPW}"
>           remotedir="${testFolder}"
>           systemTypeKey="UNIX">
>        <fileset dir="J:\folder1\folder2\folder3\folder4">
>          <include name="*.zip"/>
>        </fileset>
>      </ftp> 
> 
> 
> Does not work:
>  <ftp action="get"
>           server="${testServer}"
>           userid="${testUserID}"
>           password="${testPW}"
>           remotedir="${testFolder}"
>           systemTypeKey="UNIX">
>        <fileset dir="\\computername\folder1\folder2\folder3\folder4">
>          <include name="*.zip"/>
>        </fileset>
>      </ftp> 
> 


You may want to file a bugrep on this...it may well be a problem.

However, it may be hard for the ant team to fix.

1. windows itself makes a bit of a mess of unc filenames. Try doing a cd 
to one, for example.

2. the java APIs from sun get in the way. its only recently they've 
opened up access to the full length unicode names of the sort 
\\?\server\path

3. it's really hard to test this stuff reliably as part of ant's normal 
unit tests -you need to know hostnames and mount points to do it reliably.

-steve



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org