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