You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Antoine Lévy-Lambert <an...@antbuild.com> on 2004/02/06 12:37:58 UTC

Re: Ant1.6 - FTP task with MS FTP

Elischer, Matt (M.) wrote:

>Hi all,
>
>I'm trying to retrieve a file from a MS FTP server with Ant1.6.0.  I'm using JDK1.3.1 and commons-net-1.1.0.jar.  My target is as follows:
>
>	<target name="retrieve_content" description="retrieves content from FTP box">
>		<ftp action="get" server="${ftp_server}" userid="${ftp_username}" password="${ftp_password}" remotedir="${ftp_remotedir}">
>		    	<fileset dir="${content.download.dir}">
>	      			<include name="test.zip"/>
>		      	</fileset>
>		</ftp>
>	</target>
>
>The "ls -l" format is:
>02-05-04  04:18PM              5330144 test.zip
>01-12-04  10:10AM              5326962 test1.zip
>02-03-04  03:39PM             41314968 test2.zip
>
>Trying both a "get" and a "list" produces the following (verbose) output (ie. 0 files listed):
>retrieve_content:
>      [ftp] Opening FTP connection to xxx.xxxx.xxx
>      [ftp] connected
>      [ftp] logging in to FTP server
>      [ftp] login succeeded
>      [ftp] changing the remote directory
>      [ftp] listing files
>      [ftp] 0 files listed
>      [ftp] disconnecting
>
>It seems that the problem is something to do with the parsing of the file listings, as I've confirmed I am connecting properly, and navigating to the correct remote dir.  I've also confirmed that the target works on a Unix FTP server.  I read one posting suggesting that there is a flag that can be set for MS FTP servers?  Any ideas on how I can get this task to with MS FTP would be greatly appreciated.
>
>Cheers,
>-matt
>
>  
>
Hi Matt,
I think that there are some problems with the MS FTP server and the ant 
task and commons-net at the moment.
Read this : http://marc.theaimsgroup.com/?l=ant-dev&m=107427367901369&w=2

Cheers,

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: Ant1.6 - FTP task with MS FTP

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Sorry for the spam, I had not seen that Steve Cohen had already answered 
this message.

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: Ant1.6 - FTP task with MS FTP

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Sorry for the spam, I had not seen that Steve Cohen had already answered 
this message.

Antoine

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


Re: Ant1.6 - FTP task with MS FTP

Posted by Steve Cohen <sc...@javactivity.org>.
Actually, if you are willing to get the latest commons-net from CVS and build 
the jar, it is no longer necessary to change the MS FTP server-type property.
And as soon as 1.2.0 of commons-net is released, it will no longer be 
necessary to build commons-net to get this functionality.


On Friday 06 February 2004 4:56 pm, Clark Archer wrote:
> ALL> Elischer, Matt (M.) wrote:
> >>Hi all,
> >>
> >>I'm trying to retrieve a file from a MS FTP server with Ant1.6.0.  I'm
> >> using JDK1.3.1 and commons-net-1.1.0.jar.  My target is as follows:
> >>
> >>       <target name="retrieve_content" description="retrieves content
> >> from FTP box"> <ftp action="get" server="${ftp_server}"
> >> userid="${ftp_username}" password="${ftp_password}"
> >> remotedir="${ftp_remotedir}"> <fileset dir="${content.download.dir}">
> >>                               <include name="test.zip"/>
> >>                       </fileset>
> >>               </ftp>
> >>       </target>
>
> Matt,
>
> did you set your MS FTP server to return UN*X-style
> directory listings?  On one of the property pages for the
> FTP site, you have to change from the default Windows-style
> before <ftp> will work correctly.
>
> -Clark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: Ant1.6 - FTP task with MS FTP

Posted by Clark Archer <ca...@drillinginfo.com>.
Friday, February 6, 2004, 4:56:07 PM, I wrote:

CA> did you set your MS FTP server to return UN*X-style
CA> directory listings?  On one of the property pages for the
CA> FTP site, you have to change from the default Windows-style
CA> before <ftp> will work correctly.

You should see a directory listing like this:

220 c0ww0 Microsoft FTP Service (Version 5.0).
...
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rwxrwxrwx   1 owner    group        79123709 Jan 13 20:56 di-web.zip
226 Transfer complete.
ftp>

-Clark


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: Ant1.6 - FTP task with MS FTP

Posted by Clark Archer <ca...@drillinginfo.com>.
ALL> Elischer, Matt (M.) wrote:

>>Hi all,
>>
>>I'm trying to retrieve a file from a MS FTP server with Ant1.6.0.  I'm using JDK1.3.1 and commons-net-1.1.0.jar.  My target is as follows:
>>
>>       <target name="retrieve_content" description="retrieves content from FTP box">
>>               <ftp action="get" server="${ftp_server}" userid="${ftp_username}" password="${ftp_password}" remotedir="${ftp_remotedir}">
>>                       <fileset dir="${content.download.dir}">
>>                               <include name="test.zip"/>
>>                       </fileset>
>>               </ftp>
>>       </target>

Matt,

did you set your MS FTP server to return UN*X-style
directory listings?  On one of the property pages for the
FTP site, you have to change from the default Windows-style
before <ftp> will work correctly.

-Clark


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org