开发者

ant ftp task "Could not date test remote file"

I am using Ant ftp task to deploy my project files to a remote app server. Ant is not able to detect the date of the remote file and it re-uploads all files every time.

When I start Ant 开发者_开发知识库in debug mode it says:

  [ftp] checking date for mailer.war
  [ftp] Could not date test remote file: mailer.war assuming out of date.

The remote server is MS FTP (Windows Vista version) Ant version is 1.8.2; I use commons-net-2.2 and jakarta-oro-2.0.8 (could not find newer version)

My ant task looks like this

  <!-- 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>

I read an article here: Ant:The definitive guide that says I need a version of jakarta oro AFTER 2.0.8 to talk to MS FTP servers, I built jakarta-oro-2.1-dev-1 from SVN and used it, but I got the same thing. No difference with the new library or without oro library at all. I noticed that there is ant-apache-oro.jar in Ant lib. I tried to remove it too, no use. There is ant-commons-net.jar too, but the ftp won't work without external commons-net-2.2.jar. Very strange.

Please, can anyone help me with this? Any solution or any alternatives to the Ant ftp task? Thanks!


jakarta-oro-2.0.8 is the latest official (and stable) version, but there are newer development versions available in the svn repository:

There is 2.0.9-dev-1 here: http://svn.apache.org/repos/asf/jakarta/oro/tags/oro-2.0.9-dev-1/

And I think 2.1-dev-1 is in the trunk here: http://svn.apache.org/repos/asf/jakarta/oro/trunk/

You will have to check it out and build it yourself (I think just running ant will build the jar by default). To check it out from trunk do:

svn co http://svn.apache.org/repos/asf/jakarta/oro/trunk/ oro

EDIT: Are you sure MS FTP file date is in MMM dd HH:mm format? Try logging into your ftp and doing a LIST command. I thought it was more like MM/dd/yyyy HH:mm:ss (or maybe without seconds).

Also try adding timediffauto="true". It might be a timestamp synchronization problem.


I upgraded to IIS 7.5 FTP service and now everything is fine. Thanks for the help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜