ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: help with ftp task
Date Sat, 20 Dec 2003 12:48:12 GMT
Jacob Kjome wrote:

>I'm wondering how I can get the equivalent of the following using the <ftp> (or

>some other ftp compatible) task....
>
><get src="@{srcfile}" dest="${dependenciesdir}/file.zip" />
><unzip src="${dependenciesdir}/file.zip" dest="${dependenciesdir}"/>
><delete file="${dependenciesdir}/file.zip"/>
>
>
>Basically, the problem is that I don't see how I can specify the dest file like 
>the <get> task allows.  I need to be able to specify it as a generic name to a 
>specific location so that I can unzip it and then delete that file.  Is the ftp 
>task going to be able to do this for me?  I can't see how it can based on what 
>I've read in the docs.  Is there some other task out there that can perform 
>what I require?
>
>It would also be nice if I could simply provide a fully qualified URL to the 
>file rather than have to split it up between server and then file such as....
>
><ftp action="get" userid="annonymous" password="me@myorg.com" src="@{srcfile}" 
>dest="${dependenciesdir}/file.zip" />
>
>
>This would make it so getting single files would be syntactically equivalent to 
>the <get> task.  The <ftp> task ought to be able to break apart the URL into

>its appropriate parts without me having to manually split it.
>
>Thoughts?
>
>Jake
>
>  
>
Hi Jakob,
you cannot specify how you are going to name a file that you are 
downloading with the "ftp" task.
you might want to have a look at the "common-vfs" sandbox project of 
Jakarta.

The current syntax of the ftp task is a bit strange.
This snippet here means download the files matching "some.zip" from the 
remotedir /foo/bar on ftp.apache.org.
The base directory of the fileset is not used by the task (because it is 
a get action), only the remotedir.

 <ftp action="get"
       server="ftp.apache.org"
       userid="anonymous"
       password="me@myorg.com"
        remotedir="/foo/bar">
    <fileset dir="htdocs/manual">
      <include name="some.zip"/>
    </fileset>
  </ftp>

Antoine


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message