【发布时间】:2011-02-19 14:33:27
【问题描述】:
我正在使用 Ant ftp 任务将我的项目文件部署到远程应用服务器。 Ant 无法检测到远程文件的日期,每次都会重新上传所有文件。
当我在调试模式下启动 Ant 时,它会说:
[ftp] checking date for mailer.war
[ftp] Could not date test remote file: mailer.war assuming out of date.
远程服务器是 MS FTP (Windows Vista 版本) Ant版本为1.8.2;我使用 commons-net-2.2 和 jakarta-oro-2.0.8(找不到更新的版本)
我的蚂蚁任务是这样的
<!-- Deploy new and changed files -->
<target name="deploy" depends="package" description="Deploy new and changed files">
<ftp server="localhost"
userid="" password=""
action="send" depends="yes"
passive="true"
systemTypeKey="WINDOWS" serverTimeZoneConfig="Europe/Sofia"
defaultDateFormatConfig="MMM dd yyyy" recentDateFormatConfig="MMM dd HH:mm"
binary="true" retriesAllowed="3"
verbose="true">
<fileset dir="${webapp.artefacts.path}"/>
</ftp>
</target>
我在这里读到一篇文章:Ant:The definitive guide 说我需要 2.0.8 之后的 jakarta oro 版本才能与 MS FTP 服务器通信,我从 SVN 构建了 jakarta-oro-2.1-dev-1 并使用了它,但是我得到了同样的东西。与新图书馆或没有 oro 图书馆没有区别。我注意到 Ant lib 中有 ant-apache-oro.jar。我也试过删了,没用。也有 ant-commons-net.jar,但如果没有外部 commons-net-2.2.jar,ftp 将无法工作。很奇怪。
请问,谁能帮我解决这个问题? Ant ftp 任务的任何解决方案或替代方案?谢谢!
【问题讨论】: