【发布时间】:2014-06-30 23:58:15
【问题描述】:
我想用ant构建我的web项目,通过scp复制到服务器上。
构建分为三个步骤:
- 收集数据
- 通过 scp 复制收集的数据
- 干净
问题是第 2 步以某种方式损坏了我的 utf-8 文件(我收到了很棒的“标头已由”错误消息发送)。
如果我跳过第 2 步和第 3 步并使用 WinSCP 自己复制收集的文件,一切正常。这意味着:ant copy 命令可以正常工作。
不能正常工作的是ant scp命令:
<scp todir="${remote_user}:${remote_password}@${remote_host}:${remote_basepath}/core" trust="true" failonerror="yes">
<fileset dir="${build_root}/core/">
<include name="${core_src}/" />
</fileset>
</scp>
我正在使用带有内置 ant 插件的 Windows 7 和 Eclipse 4.3 (Kepler)。
到目前为止我尝试了什么: - 复制时设置编码和输出编码属性 - 在 JRE 选项卡上的构建配置中设置 -Dfile.encoding=UTF8 - 尝试了 jre7,但后来我遇到了 Keberus 错误。所以还是用jre6
我希望有人可以帮助我:)
【问题讨论】: