【问题标题】:Eclipse Neon and Ant 1.9.6 using JCraft SSH ImplementationEclipse Neon 和 Ant 1.9.6 使用 JCraft SSH 实现
【发布时间】:2016-07-04 10:13:00
【问题描述】:

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

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

构建失败 C:\project\build.xml:31: com.jcraft.jsch.JSchException: 无法将 'source.jar' 发送到 '/target/lib' - 3:权限被拒绝

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

【问题讨论】:

  • 您是否也将 Java 从 1.6 更改为 1.8?如果是,请参阅 Permission denied using ant and scp
  • 我没有更改 java 版本,两个 eclipse 都使用 jdk 1.8 运行。我安装了 ant 1.9.4 并在窗口 > 首选项 > ant 下设置了一个新的 ant home。它的工作原理。

标签: eclipse ant


【解决方案1】:

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

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

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

【讨论】:

  • 应该是评论
  • 我没有足够的声望来评论抱歉
猜你喜欢
  • 2017-08-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-06
  • 1970-01-01
  • 2013-10-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多