C.9 FtpDeployTask

Deploys a set of files to a remote FTP server.

Table C.10: Attributes

NameTypeDescriptionDefaultRequired
hostStringThe hostname of the remote server.noneYes
portIntegerThe port of the remote server.21No
usernameStringThe username to use when logging in to the remote server.noneYes
passwordStringThe password to use when logging in to the remote server.noneYes
sslbooleanWhether to connect via SSL. This requires Net/FTP to be installed.falseNo
dirStringDirectory on the remote server.noneNo
modeStringThe transfer mode to use, either ascii or binary.binaryNo
clearfirstBooleanDelete all files in the remote directory before uploading.falseNo
passiveBooleanOpen connection in passive modefalseNo
dirmodemixed Permissions of the uploaded files, can either be 'inherit' or it can be a octal value without the leading zero. Settings the dirmode to 'inherit' will cause the uploaded files to have the same permissions as on the filesystem. falseNo
filemodemixedThis option does the same as dirmode, except it only affects regular files.falseNo
dependsboolean If depends is set to true, the task will only update files with a local modification timestamp that is newer than the corresponding timestamp on the server. falseNo
levelStringControl the level at which the task reports status messages. One of error, warning, info, verbose, debug.verboseNo
rawdatafallbackboolean If Net_FTP is not able to parse the raw ftp data, the depends option does not work at all. Setting rawdatafallback will cause phing trying to parse the ftp data on its own, so the depends option might work again. If depends is set to false, rawdatafallback is ignored. No 
skiponsamesizeBooleanSkip upload, if file of same size exists.falseNo

C.9.1 Example

<ftpdeploy
  host="${ftp.host}"
  port="${ftp.port}"
  username="${ftp.username}"
  password="${ftp.password}"
  dir="${ftp.dir}"
  ssl="true"
  passive="false"
  mode="${ftp.mode}">
  <fileset dir=".">
    <include name="**"/>
    <exclude name="phing"/>
    <exclude name="build.xml"/>
    <exclude name="images/**.png"/>
    <exclude name="images/**.gif"/>
    <exclude name="images/**.jpg"/>
  </fileset>
</ftpdeploy>

C.9.2 Supported Nested Tags