I'm trying to scp a directory to a remote server, but I'm getting this error. Please help
Exactly one of [file|localfile|remotefile] or one or more nested filesets is required.
ant.scp(todir:"user@mycompany.com:/home/user/db",keyfile:"test.pem") {
fileset(dir:"/home/test")
}
Which version of ant and groovy do you use? I use ant 1.8.2, groovy 1.8.6, jsch 0.1.46,ant-jsch 1.6.2, ant this script do works:
ant = new AntBuilder()
ant.scp(todir:"user1@mycorp.com:~/temp",keyfile:"/tmp/user1.pem",verbose:true, trust:true, passphrase:""){
fileset(dir:"/user1/temp")
}