Hi,

I had this problem some time ago and I implemented an Ant task using the
Java.util.jar API to compare the manifests of both jarfiles.  In my case
both jarfiles were signed so the manifests were different if the jarfiles
were different.
This was on a local filesystem also so I had no FTP requirment.

Fintan

-----Original Message-----
From: Brent Bain [mailto:[EMAIL PROTECTED]
Sent: 14 December 2004 21:08
To: '[EMAIL PROTECTED]'
Subject: Comparing Files on Two Servers


Hello:

I'm hoping to save some time during deployments by comparing a local zip
file against a remote server's zip file.  My first thought was to use the
checksum task, but the timestamps are deffinately going to be different.
The basic idea is this:
Perform a local build and zip up the files.
Compare the local zip file against a remote zip file
    If it's different then push the new zip file and extract on the remote
machine.
    If it's not different, don't do anything.
 
I tried this with the checksum task originally.  I would generate a file
that gets pushed to the remote machine at the same time I push the zip file
if things were different.  Then I can just grab the checksum file from the
remote machine and compare it against whats newly built/zipped.
 
In theory the byte size could be the same (a boolean gets changed from 0 to
1 in a prop file for example).
 
So is this hopeless?  I'm looking at saving 2-3hrs over the course of a day
if I can somehow detect that there were indeed changes.
My other thought was to parse the VSS history to see if there are any files
that have changed -- but again -- that seems slower then just a compare of
the files.
 
Needless to say, simply comparing the date (OutOfDate task or UpToDate task)
won't work since the zip file will be newly made and the same file on the
remote machine might be several days/weeks old.  My other challenge is that
I only have SSH and FTP access to the remote machine...
 
If someone else has run into this or if anyone else has some tips that I'm
just overlooking I would greatly appreciate it!!
In advance, many thanks!!!
Brent
************************************************************************
This e-mail and any files transmitted with it are confidential and may be
privileged and are intended solely for the individual named/ for the use of
the individual or entity to whom they are addressed.If you are not the
intended addressee, you should not disseminate, distribute or copy this
e-mail.Please notify the sender immediately if you have received this e-mail
by mistake and delete this e-mail from your system.If you are not the
intended recipient, you are notified that reviewing, disclosing, copying,
distributing or taking any action in reliance on the contents of this e-mail
is strictly prohibited.Please note that any views or opinions expressed in
this e-mail are solely those of the author and do not necessarily represent
those of Traventec Limited.E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, or arrive late or incomplete.Traventec Limited therefore does not
accept liability for any errors or omissions in the contents of this
message, which arise as a result of e-mail transmission.The recipient should
check this e-mail and any attachments for the presence of viruses.This
e-mail has been swept for computer viruses however Traventec Limited accepts
no liability for any damage caused by any virus transmitted by this e-mail.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to