Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 5774 invoked from network); 1 May 2002 17:23:52 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 1 May 2002 17:23:52 -0000 Received: (qmail 23694 invoked by uid 97); 1 May 2002 17:23:52 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@nagoya.betaversion.org Received: (qmail 23604 invoked by alias); 1 May 2002 17:23:51 -0000 Delivered-To: jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 23590 invoked by uid 97); 1 May 2002 17:23:51 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 23578 invoked by uid 98); 1 May 2002 17:23:51 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <00c601c1f134$f4615f20$cc878f80@darden.virginia.edu> From: "Erik Hatcher" To: "Ant Developers List" References: <20020430223836.42729.qmail@icarus.apache.org> <5.1.0.14.0.20020430180029.039da6d8@orson.callenish.com> Subject: Re: Selector examples Date: Wed, 1 May 2002 13:23:47 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N More selector questions: They cannot be pre-defined and applied to multiple 's, can they? It doesn't appear this was taken into account though. It would have been nice if this functionality was available for 1.5, but I'm guessing thats not a possibility at this point. We can re-use across multiple 's though, so it will be confusing that selectors are locked into a single fileset. Erik ----- Original Message ----- From: "Bruce Atherton" To: "Ant Developers List" Sent: Tuesday, April 30, 2002 9:41 PM Subject: Re: Selector examples > At 07:17 PM 4/30/2002 -0400, you wrote: > >Could you provide, just briefly and quickly, some examples of the selector > >usage that you have been playing with? > > Sure thing. I'll describe each of the selectors here, and you can also look > at the build.xml file I attached to my last message to see some of them in > use. That file downloads the Ant 1.4.1 tarball and unpacks it, makes a few > changes so that the selectors have something to play with, and then runs > each of the static selectors in turn. > > Here is a description of each of the selectors so far. The selectors are > used inside or in other selectors that act as containers. The > containers are: > > - only select a file if it is selected by all the selectors in > this container > - select a file if any of the selectors in this container select it > - selected files become not selected, and vice versa. This can > contains only a single selector > - select a file if none of the contained selectors select it > - this selects a file if the majority of its contained > selectors select it. It is here to make people aware they can go beyond > boolean thinking. > > The noncontainer selectors that are provided, which I am calling static > selectors, are: > > - selects files based on name attribute, just like > include. And to emulate exclude, it has a negate attribute as well > - selects files based on directory depth, using min and > max attribute > - selects files based on their size. Attributes are size, > units (K, M, as well as Ki for 2^10), and when (less, more, equal) > - selects files based on the date of their last > modification. Attributes are millis, datetime, when (before, after, equal), > and checkdirs > - selects files based on whether they exist or not in > another directory tree. Attributes are targetdir and present (srcdir, > both). It can contain a mapper element to map the files > - selects files if they are newer than ones in another > directory tree. Attributes are targetdir and granularity. It also can > contain a mapper element > - selects files that contain a string. Attributes are > contains and casesensitive > > There is also a special selector, , with which users can > include their own selectors. It uses the element code from filters. > It has attributes for classname, classpath, and classpathref. Static > selectors can be called from extendselect unless they have their own elements. > > Here are a couple of examples. To get all the files which contain the > "" tag that are bigger than 5,000 bytes, put this fileset in your task: > > > > > > > > > To get a list of all the files which are unchanged since Ant 1.4.1, use this: > > > > > > > > > Hope that is clearer. > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: