The FTP task seems to work well when transferring entire subdirectories,
but it has trouble when parts of the directory structure already exist.
For example, if I have a local directory structure like this:
DirA
|
+-DirB
|
|-file1
|-file2
And I run the following target:
<ftp
server="${SERVER}"
userid="${USERID}"
password="${PASSWORD}"
remotedir="{~/${USERID}/A"
verbose="yes"
depends="yes">
<fileset dir="${USERID}/A"/>
</ftp>
Then the structure is created on the remote machine and the files are
transferred. Now, if I 'touch' file2 or file2 and run the target again
I get the following error:
[ftp] sending files
[ftp] transferring [OMITTED]/A/B/file1
BUILD FAILED
build.xml:[LINENUM]: could not create directory: 521
"[OMITTED]/A/B" directory exists
So, it seems that the task needs to check for the existence of the
directory ahead of time, or ignore such an error. I'm not sure what the
best approach would be.
Thanks,
Alanis S. Sinala