Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 44164 invoked from network); 14 Jun 2007 16:53:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 16:53:50 -0000 Received: (qmail 58070 invoked by uid 500); 14 Jun 2007 16:53:48 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 58040 invoked by uid 500); 14 Jun 2007 16:53:48 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 58024 invoked by uid 99); 14 Jun 2007 16:53:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 09:53:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of peter.kitt.reilly@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 09:53:44 -0700 Received: by ug-out-1314.google.com with SMTP id q2so675800uge for ; Thu, 14 Jun 2007 09:53:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EawSq62JPufRiGgmcZsTSoIl9yp3ktgelbuRbRIqJ7MP7rAns4qnTv7156iijWfC6mKU5c+lsGhl18h3Pww0vqXpC+ZoPkCfYkLv0rpAZEDadkaAXcHcovAnoogiibshZagI8UAnzQYpBAzCVik23zzLTXPVec7k1w4Cm7Xuy8U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EaIlU7EZxlPGH0b0wcR6UGnT3BmvLSCR2oJjXiYTcivnp2pLOvO9Ngcy5n5aGV/hc7nv4344fEeR6N4HglD8Dibeiej2NB+k4+yjMAdqdB4OpX+PJc6j+VsHPCJDN2q5omnJBjfPdHTiqaJAR/HXO/SmHsbM5UgCpyUR4IPwUDQ= Received: by 10.82.116.15 with SMTP id o15mr3776998buc.1181840001891; Thu, 14 Jun 2007 09:53:21 -0700 (PDT) Received: by 10.82.120.12 with HTTP; Thu, 14 Jun 2007 09:53:21 -0700 (PDT) Message-ID: Date: Thu, 14 Jun 2007 17:53:21 +0100 From: "Peter Reilly" To: "Ant Users List" Subject: Re: replace an entry in a zip file? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <32251DD60B0C1B4386EE15B0FA279A62060114C2@mercmbx08.na.sas.com> X-Virus-Checked: Checked by ClamAV on apache.org Whats wrong is that he was using instead of . will create a manifest entry in the jarfile. The timestamp of this manifest entry will the time time that the task was run - (if there are updates to be done). One cannot mix and . Peter On 6/14/07, RADEMAKERS Tanguy wrote: > that's weird, i'm using 1.6.5 as well. > > I think we have a misunderstanding. > > Here's what i did: > > 1) make three files a.txt, b.txt, c.txt, each with some text > > 2) create the following build.xml: > > > > > > > > > > > 3) run that to get the first zip file: txtfiles.zip, containing the > three txt files listed above. > > 4) move b.txt and c.txt to b.bak and c.bak (so the zip task no longer > sees them) and update a.txt (add a string "updated") > > 5) re-run the build, and the updated zip archive txtfiles.zip now > contains the original versions of b.txt and c.txt, but the updated > version of a.txt. > > In my book, that's equivalent to "replace one entry in a zip file with > an updated file", no? > > /t > > >-----Original Message----- > >From: Cyril Sagan [mailto:Cyril.Sagan@sas.com] > >Sent: Thursday, June 14, 2007 6:12 PM > >To: Ant Users List > >Subject: RE: replace an entry in a zip file? > > > >Thanks for your reponse. However, this does not work for me > >in Ant 1.6.5. > >Note that my goal is to *replace* a file that's already in the zip. > > > >Seems like the best solution would be for the duplicate > >attribute to support a "replace" option. > > > >FWIW, I'm doing this to control my jar manifest. I can't use > > because Ant merges with its default manifest. I'm > >having a hard time employing this advice from the Ant doc: > > > >http://ant.apache.org/manual/CoreTasks/manifest.html > > > > If you find that Ant generates manifests incompatible with your > > runtime, take a manifest it has built, fix it up however you need > > and switch to using the task to create the JAR, feeding in > > the hand-crafted manifest. > > > >Here's my build.xml: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > fullpath="META-INF/MANIFEST.MF"/> > > > > > > > > > >Thanks. > > > >--Cyril > > > > > >-----Original Message----- > >From: RADEMAKERS Tanguy [mailto:Tanguy.RADEMAKERS@swift.com] > >Sent: Thursday, June 14, 2007 5:23 AM > >To: Ant Users List > >Subject: RE: replace an entry in a zip file? > > > >Hello Cyril, > > > >>GOAL: To replace one entry in a zip file with an updated file. > >> > >>I cannot find an elegant way to do this, short of 'ing the > >>archive, replacing the file of interest and then re-. It seems > >>there should be a better way. Can anyone help? > >> > >>Thanks. > >> > >>--Cyril > > > >If you use the update attribute of the zip task - it will > >"refresh" the zip with the file or files you send it, without > >changing or removing the other files in the archive. You may > >still need to extract the files of interest from the zip if > >you don't have them elsewhere, but you don't need to explode > >the whole zip just to change a few files. > > > >Regs, > >/t > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For > >additional commands, e-mail: user-help@ant.apache.org > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > >For additional commands, e-mail: user-help@ant.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org