Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 28573 invoked from network); 14 Jun 2007 16:12:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 16:12:13 -0000 Received: (qmail 60743 invoked by uid 500); 14 Jun 2007 16:12:12 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 60716 invoked by uid 500); 14 Jun 2007 16:12:12 -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 60705 invoked by uid 99); 14 Jun 2007 16:12:11 -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:12:11 -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 Cyril.Sagan@sas.com designates 149.173.6.148 as permitted sender) Received: from [149.173.6.148] (HELO mercav05.na.sas.com) (149.173.6.148) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 09:12:07 -0700 Received: from mercmbx08.na.sas.com ([10.16.9.158]) by mercav05.na.sas.com with InterScan Message Security Suite; Thu, 14 Jun 2007 12:11:45 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: replace an entry in a zip file? Date: Thu, 14 Jun 2007 12:11:44 -0400 Message-ID: <32251DD60B0C1B4386EE15B0FA279A62060114C2@mercmbx08.na.sas.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: replace an entry in a zip file? Thread-Index: AceuYV96mY3ZPKFiT5KLF2mH6P1NAgAA27MgAA4Q7hA= From: "Cyril Sagan" To: "Ant Users List" X-Virus-Checked: Checked by ClamAV on apache.org 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: =20 Thanks. --Cyril -----Original Message----- From: RADEMAKERS Tanguy [mailto:Tanguy.RADEMAKERS@swift.com]=20 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=20 >archive, replacing the file of interest and then re-. It seems=20 >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