ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Sheldon" <SBr...@Tilion.com>
Subject RE: FTP Task's "mkdir" action
Date Wed, 05 Sep 2001 15:50:32 GMT
>From my understanding of it, this is a limitation of the FTP protocol, not
ANT.  Ever used command line FTP and run into the same problem? (UNIX or
DOS).  The application level needs to have the intelligence to recurse, as
FTP does not support it.  So there is an argument for ANT supporting it, but
it would be a feature.  As it is now I suspect is merely raps the FTP mkdir
command.

Sheldon

-----Original Message-----
From: Matt Lyon [mailto:matt@stargus.com]
Sent: Wednesday, September 05, 2001 11:31 AM
To: Ant User Mailing List (E-mail)
Subject: FTP Task's "mkdir" action


All,

Maybe I am missing something here, so feel free to administer an
intellectual dope-slap if that is the case. I have been tuning up my
buildfiles to take advantage of some of Ant 1.4's new features, and I
was quite chuffed to find that the optional FTP task now supports mkdir.
However, I was subsequently kind of bummed to find that I could not use
the mkdir action to generate recursive (e.g. nested) directory
structures. For example, consider the following build.xml snippet:

		<ftp action="mkdir"
		     server="${publish.sys}"
		     userid="${publish.user}"
		     password="${publish.pass}"
	
remotedir="/export/home/stargus/build/workdir${build.number}/java"/>

In this example, the task fails if the directory structure
/export/home/stargus/build/workdir${build.number} does not already
exist. The obvious workaround is to code two separate tasks as follows:

		<ftp action="mkdir"
		     server="${publish.sys}"
		     userid="${publish.user}"
		     password="${publish.pass}"
	
remotedir="/export/home/stargus/build/workdir${build.number}"/>
		<ftp action="mkdir"
		     server="${publish.sys}"
		     userid="${publish.user}"
		     password="${publish.pass}"
	
remotedir="/export/home/stargus/build/workdir${build.number}/java"/>
		
It would be nice if mkdir could recursively generate the nested
directory structure that I publish builds to on our distribution site,
as it would save a wee bit of typing (OK, not that much in reality). In
any case, I wanted to post this thread as a sanity check. Am I using the
FTP task's "mkdir" action incorrectly, or am I being nit-picky, or both?

Cheers,

Matt

Mime
View raw message