Starting with the projects hosted at Jakarta and the old Java Apache project, Ant spread like a virus and is now the build tool of choice for a lot of projects.
The basedir attribute is the reference directory from where to zip.
The same thing can be accomplished by using the prefix and fullpath attributes of zipfilesets in a Zip or Jar task.) The extended zipfileset element from the zip task (with attributes prefix, fullpath, and src) is available in the War task.
The task is also resource-enabled and will add nested resources and resource collections to the archive.
[Download message RAW] Basically when you call your war task the first time to create it, you can call a war task a 2nd time and use its update attrib: Using Apache Ant's "core task" war examples: This is the first time you start a war task: Subject: RE: Adding jar files to already existing war files Date: Wed, 0530 MIME-Version: 1.0 Received: from mail.([22.214.171.124]) by bay0-mc3-f15.bay0.with Microsoft SMTPSVC(6.0.3790.1830); Tue, -0800 Received: (qmail 20772 invoked by uid 500); -0000 Received: (qmail 20761 invoked by uid 99); -0000 Received: from asf.(HELO asf.osuosl.org) (126.96.36.199) by (qpsmtpd/0.29) with ESMTP; Tue, -0800 Received: pass (asf.osuosl.org: domain of [email protected] 1.140 as permitted sender) Received: from [1.140] (HELO smtpde03.sap-ag.de) (1.140) by (qpsmtpd/0.29) with ESMTP; Tue, -0800 Received: from (smtpde03) by smtpde03.(out) with ESMTP id HAA15586 for Delivered-To: mailing list [email protected]: No, hits=0.3 required=10.0tests=MAILTO_TO_SPAM_ADDR, SPF_HELO_PASS, SPF_PASS X-Spam-Check-By: X-Mime OLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Thread-Topic: Adding jar files to already existing war files Thread-Index: Ac ZNe0U l7Poc9x DTm CJB CZCbs Y4QAAi EEw X-Original Arrival Time: .0073 (UTC) FILETIME=[8EEC28C64D7D] X-SAP: out X-Virus-Checked: Checked by Clam AV on Return-Path: [email protected] actually it's a daily task (part of a build process) So need to do it every time a build is made Could you please elaborate on war task's update attribute??? Otherwise, if this is to be done every time through your ant file, then you have to use the war task's 'update' attribute to accomplish this.
-----Original Message----- From: Res Pons [mailto:[email protected]] Sent: Wednesday, 22 March 2006 PM To: [email protected]: RE: Adding jar files to already existing war files If this is a one time deal, rather than resorting to Ant tasks, use JDK's/bin/jar utility or command to accomplish this.