You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by phil southward <ph...@vs-gruppe.de> on 2001/09/21 13:06:27 UTC

FTP tries to create directory for changed files when one already exists, even though newer or depends has been used.

Sorry should also have written that I've tried this on both ant 1.3 and ant
1.4 and have also got the latest version of NetComponents.jar and tried that
too, but I still get the same error.

Phil

 -----Ursprüngliche Nachricht-----
Von: 	phil southward [mailto:phil.southward@vs-gruppe.de]
Gesendet:	Friday, 21 September 2001 12:53 PM
An:	'ant-user@jakarta.apache.org'
Betreff:	FTP tries to create directory for changed files when one already
exists, even though  newer or depends has been used.

Hi All,

I was wondering if someone might be able to help me with a problem I have
with the FTP task failing when directories and files already exist on the
remote server. One part of the (jsp) application we have, consists of a list
of static html files (in a set of directories) that periodically need
updating when some new files are added or others are changed. I've written
an ftp task in our ant script to do this, but I get problems when trying
running it. The error I get is:

BUILD FAILED

C:\projects\vsweb\sources\build.xml:153: could not create directory: 521
"/vs/htdocs/agb" directory exists

In the ftp task (as you can see below) I have tried both the newer and
depends attributes, yet I still get this problem.

	<target name="deploytodevapache">
	   <!-- Copy the html and gifs, jpegs, etc to the apache server-->
		<echo message="copy ${basedir}/htdocs to
${dev.apache}${dev.apache_home}/htdocs"/>
		<ftp  server="${dev.apache}"
				remotedir="${dev.apache_home}/htdocs"
				userid="user"
				password="password"
				binary="yes"
				verbose="yes"
				depends="yes">
			<fileset dir="${basedir}/htdocs"/>
		</ftp>
	</target>

I have no problems if I manually delete all the files on the remote server
first and then run this target. All 4,000 files and their directories,
subdirectories, etc are transmitted without problem. I've also tried ftping
to another directory, changing the unix permissions, but still the same
problem. The problem only seems to occur when I try to ftp the files to an
existing directory structure, then I get the above message. If I run the ant
script when no files have been changed, no error occurs, no files are
transmitted, which means that the depends or newer attributes are working
correctly in this case. So why then do I get the error when I have new
files?

Any help you can give me would be most appreciated.

Phil