In my code am using something like
<sshexec host="somehost"
username="dude"
password="yo"
command="ftp_download"/>
<ftp action="get" server="server_todownload" userid="user" password="aaa" remotedir="dowload/dir">
<fileset dir="${installerdirectory}"><include name="${file_name}"/></fileset>
</ftp>
In “command” of sshexec how i can pass the ftp action as parameters??
is there any example or document is there to get more knowledge??
Thanks in advance
I guess you want to:
I think you misunderstood something.
<sshexec>is a task that sshes to a machine and executes a command on that machine. The command it executes must exist on that machine. For example, your code:There must be a command named
ftp_downloadexisting onsomehostor your<sshexec>will fail. You can’t use an ant task in your local build file as a parameter because<sshexec>doesn’t work in this way at all.Suggestion:
You can put the
ftptask in an ant build file, and deploy it to the remote machine (you can usescptask) beforesshexec. Insshexec‘s command, you writeant -f path_to_build_file ftp_target. You need to ensure that there is ant on that machine.