Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 24358 invoked from network); 12 Oct 2002 01:00:47 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Oct 2002 01:00:47 -0000 Received: (qmail 10886 invoked by uid 97); 12 Oct 2002 01:01:29 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 10870 invoked by uid 97); 12 Oct 2002 01:01:29 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 10835 invoked by uid 98); 12 Oct 2002 01:01:28 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-Id: <5.1.0.14.0.20021011172750.047b8d48@orson.callenish.com> Date: Fri, 11 Oct 2002 17:59:49 -0700 To: "Ant Users List" From: Bruce Atherton Subject: Re: fileset question In-Reply-To: <5.0.2.1.0.20021010190120.01c3cc00@mail.weblaces.com> References: <3DA5DCE0.4020503@ehatchersolutions.com> <5.0.2.1.0.20021010132809.02948898@192.168.2.34> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N At 07:43 PM 10/10/2002 -0600, Elizabeth Cooper wrote: >So, I still need a way to "match","map", or otherwise form a fileset which >exactly corresponds to the *.java files in my original fileset. These >resources are *.gif, *.properties that have a filename that starts with >the same "*" of *.java. I think that first you actually need to copy your java fileset to a new directory, since Ant doesn't provide manipulation of a fileset's entries in memory (though it is an interesting idea). Let's call the new directory ${dest}. The problem you want to solve is finding the substring of the larger resource file name that will match the java file. Given "Bean32.gif", you need to know whether there are any of "Bean32.java", "Bean3.java", Bean.java", "Bea.java", "Be.java", or "B.java" in ${dest}. Again, I'm going to suggest you need a custom mapper here that could provide that type of mapping. It could take the filename passed in and strip it, character by character, and replace the "*" in the mapper's "to" attribute. If it found any file with that name, it could map to it and pass that back to . Once you had that, you could do something like: I agree with Erik and Diane that the long term solution is to organize your directory structure so that is better supports your build needs. Hopefully this is a short term solution that works for you, though. -- To unsubscribe, e-mail: For additional commands, e-mail: