Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 48104 invoked from network); 3 Jan 2001 19:50:03 -0000 Received: from unknown (HELO slim.silverstream.com) (216.142.114.209) by h31.sny.collab.net with SMTP; 3 Jan 2001 19:50:03 -0000 Received: by slim.silverstream.com with Internet Mail Service (5.5.2653.19) id ; Wed, 3 Jan 2001 14:49:16 -0500 Received: from ROSEN ([10.129.101.130]) by shady.silverstream.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id Z6BGLGC6; Wed, 3 Jan 2001 14:46:47 -0500 From: "Rosen, Alex" To: ant-dev@jakarta.apache.org Subject: RE: JLink vs. Jar Date: Wed, 3 Jan 2001 14:48:39 -0500 Message-ID: <002101c075be$2c29d930$8265810a@silverstream.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 In-Reply-To: <3A521DA0.80402@bea.com> X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > Filtered jar files don't make sense in many (most?) contexts where > filesets are used (e.g. Delete, Copy, Chmod, Move, ExecOn, Ftp, etc), > so I am a little uncomfortable folding such specialized functionality > into something as generic as FileSets. I agree, this functionality should only be provided in tasks where it makes sense: Zip and derivatives, maybe Copy, etc. But that's a separate question from what the name of the element is. Take a look at the current Zip.java that's in CVS. It defines the class PrefixedFileSet which subclasses FileSet. There's also currently both addFileset(PrefixedFileSet) and addPrefixedFileSet(PrefixedFileSet), which let you use a PrefixedFileSet as a element and a element, respectively. (There should really only be one of these - see below.) The cool thing about Ant is that just by changing the method name, you can change the element name. So even though the jarfilter functionality is specific to Zip/Jar, the element name could be either or or whatever. The disadvantage of using is that a element would have different capabilities and different possible attributes, depending on which task it was for. The advantages were listed in my last message. BTW, since the functionality would work equally well for zips as for JARs (both for the source and destination), I would propose that this functionality go in Zip.java rather than Jar.java, and that the element be or or something along those lines. On a separate topic, regardless of the functionality, we need to decide if the task should use or just . Allowing both, as we currently do, is not a great idea, as we talked about a few weeks ago. We agreed to go with , and I'm fine with it either way, but I want to double-check to see if Stefan and Pete still think this is the way to go, if we have more fileset types as well, like , , etc. I'll submit a patch for whatever is decided. > We should not exclude META-INF files altogether. I think the > right thing to do is to keep track of which files are added to > the META-INF directory, and ignore duplicates. Arguably, this > is true for all files in the Jar, not just files in the META-INF > directory. I believe that, with the current task, if you try to add the same file (from the file system) to a zip twice, it will give an error. I think we should follow this lead, and I think it's the right thing - silently picking one of the files can cause problems that are hard to track down. I think it's better to make it explicit that the same file can't be added twice, and make the user add an to decide which one to use. What I'm more worried about, and what I suspect the author of was worried about, is all the magic stuff that can be in META-INF, like signature files, index files, etc., which might not make sense when copied from one JAR to another. But I agree, arbitrarily excluding all META-INF files feels wrong, so I guess we'll just have to live with it. --Alex