2011-08-21 49 views
2

我试图将一个目录scp到远程服务器,但是我收到了这个错误。请帮助Gant,Groovy scp和Ant

只需要[file | localfile | remotefile]或一个或多个嵌套文件集中的一个。


    ant.scp(todir:"[email protected]:/home/user/db",keyfile:"test.pem") { 
     fileset(dir:"/home/test") 
    } 
 

回答

2

你使用哪个版本的ant和groovy? 我使用ant 1.8.2,1.8.6常规,jsch 0.1.46,蚂蚁jsch 1.6.2,蚂蚁这个脚本做的工作:

ant = new AntBuilder() 
ant.scp(todir:"[email protected]:~/temp",keyfile:"/tmp/user1.pem",verbose:true, trust:true, passphrase:""){ 
    fileset(dir:"/user1/temp") 
} 
+0

我设法让我的工作,因为你做同样的方式以及。 :-) 不管怎么说,还是要谢谢你。 – toy