Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 78318 invoked from network); 15 Dec 2004 08:53:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Dec 2004 08:53:45 -0000 Received: (qmail 2733 invoked by uid 500); 15 Dec 2004 08:52:33 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 2695 invoked by uid 500); 15 Dec 2004 08:52:32 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 2646 invoked by uid 99); 15 Dec 2004 08:52:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from gwysmtp.traventec.com (HELO gwysmtp.traventec.com) (193.120.171.244) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 15 Dec 2004 00:52:25 -0800 Received: from startgwyex01.traventec.com ([172.27.191.12]) by gwysmtp.traventec.com (SAVSMTP 3.1.0.29) with SMTP id M2004121509011325205 for ; Wed, 15 Dec 2004 09:01:13 GMT Received: by STARTGWYEX01 with Internet Mail Service (5.5.2653.19) id ; Wed, 15 Dec 2004 08:50:09 -0000 Message-ID: <08C15F38C433D711BDA100508B0BF5DD018A7A9C@STARTGWYEX01> From: Fintan Hynes To: 'Ant Users List' Subject: RE: Comparing Files on Two Servers Date: Wed, 15 Dec 2004 08:50:08 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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:Brent.Bain@marketlive.com] Sent: 14 December 2004 21:08 To: 'user@ant.apache.org' 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: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org