You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Will Dyke <wi...@bbc.co.uk> on 2001/09/18 13:23:25 UTC

FTP put problems

I'm using the following test script to ftp files up to a server

<project name="fakebuild" default="ftp" basedir=".">

  <target name="ftp.properties.chk" if="ftp">
    <available file="ftp.properties" property="ftp.properties.exists"/>
  </target>

  <target name="ftp" depends="ftp.properties.chk"
if="ftp.properties.exists">
    <property file="ftp.properties"/>
    <ftp server="${ftp.server}" userid="${ftp.userid}"
password="${ftp.password}"
         action="put" binary="yes" verbose="yes">
      <fileset dir=".">
        <include name="*.xml"/>
      </fileset>
    </ftp>
  </target>

</project>

Running the command line ant -buildfile ftp-test.xml -Dftp=yes -debug
-verbose
results in the following:

Ant version 1.4 compiled on September 3 2001
Ant version 1.4 compiled on September 3 2001
Buildfile: ftp-test.xml
Detected Java version: 1.3 in: c:\jdk1.3\jre
Detected OS: Windows NT
parsing buildfile D:\ant\1.4\bin\ftp-test.xml with URI =
file:D:/ant/1.4/bin/ftp
-test.xml
Project base dir set to: D:\ant\1.4\bin
Build sequence for target `ftp' is [ftp.properties.chk, ftp]
Complete build sequence is [ftp.properties.chk, ftp]

ftp.properties.chk:

ftp:
 [property] Loading D:\ant\1.4\bin\ftp.properties
      [ftp] Opening FTP connection to www-cache-icl.reith.bbc.co.uk
      [ftp] connected
      [ftp] logging in to FTP server
      [ftp] login succeeded
      [ftp] disconnecting

BUILD SUCCESSFUL

Total time: 1 second

No files are uploaded however. Snooping the ftp port at the server end also
confirms that everything apart from the upload goes ok. I'm guessing the
problem
is my <fileset> but can anyone confirm this or suggest an alternative
reason?

Thanks,
Will Dyke


This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way, and notify me immediately. The contents of
this message may contain personal views which are not the views of the
BBC, unless specifically stated.