Eclipse Neon和Ant 1.9.6使用JCraft实现SSH



我将我的eclipse从kepler and ant 1.8.4更改为neon and ant 1.9.6。如果我在Neon中运行完全相同的项目,我会通过以下ant scp命令得到ant构建错误:

<scp file="${jar.file}" todir="${user}@${host}:${destination.dir}/lib" keyfile="${privatekey}"
            passphrase="${passphrase}" sftp="true" trust="true" />

BUILD FAILED C:project BUILD .xml:31: com.jcraft.jsch.JSchException:无法发送'source.jar'到'/target/lib' - 3: Permission denied

有趣的是,最后文件在服务器上。在两个eclipse中,我将库jsch-0.1.53.jar添加到ant类路径中。

@StellaMaris看看这个bug https://bz.apache.org/bugzilla/show_bug.cgi?id=59648

我使用linux与Ant 1.8.4,我有一些目标使用scp,我的同事运行Windows,与Ant 1.9.5有你的问题,不仅如此,似乎Ant 1.9.5在scp任务中有一些回归。

无论如何,解决方案是使用ANT 1.9.4, jsch 0.1.42很好,尽管这里声明最低要求是jsch 0.1.50

最新更新