MaXal
MaXal

Reputation: 861

How to copy files using Ant between two computers with a low speed of connection?

I had two computers that are located in different parts of the world (Russia and USA) and I need to copy many (100+) small files from one machine to another with Ant. I use usual approach:

<copy preservelastmodified="true" todir="${todir}">
    <fileset dir="${fromdir}" />
</copy>

It doesn't work because during the copying task some files are missed.

Missed files are always random. Sometimes all files are copied just fine and sometimes some of them are missing. I suppose it depends on connection speed and latency.

Remote directory are mapped using NIS and copying task is been executing on Solaris (if it's matter). Is there any Ant task or special approach to solve the problem?

Upvotes: 2

Views: 510

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168825

You might try putting the 100+ small files into a single Zip or Jar and transmitting that one archive.

Upvotes: 7

Related Questions