Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 67560 invoked from network); 24 Jul 2007 15:24:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jul 2007 15:24:02 -0000 Received: (qmail 47820 invoked by uid 500); 24 Jul 2007 15:23:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 47498 invoked by uid 500); 24 Jul 2007 15:23:58 -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 47428 invoked by uid 99); 24 Jul 2007 15:23:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2007 08:23:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [206.190.58.153] (HELO web55104.mail.re4.yahoo.com) (206.190.58.153) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Jul 2007 08:23:54 -0700 Received: (qmail 47555 invoked by uid 60001); 24 Jul 2007 15:23:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jWK9VMU+MfbuCpcPwKI+xZG/TgpBX2uSkwXdHu9OaRYl4BWa5CUPep+oLakhDGpPxzlf4XyNFEWbZaoKxyBHgqVel1YLul29NaqbXskaAGqRAISpssaLcATmMEHGTpbGHO+uuW8BraBNRext7B86RP7qC+D3NPE9H9PKc7wAnlY=; X-YMail-OSG: NBHoFKMVM1mmuMwq8kndPBSbQYxWbXKCELZT0szvIhYapaIlwRbZ9bbWjgzXFvh.kPr_X89MI40HvKOWgsVds_G5UZUGDpz1XFsdrMjsa.wYayMOgsvQmuIlUaZEzA-- Received: from [66.10.233.130] by web55104.mail.re4.yahoo.com via HTTP; Tue, 24 Jul 2007 08:23:31 PDT Date: Tue, 24 Jul 2007 08:23:31 -0700 (PDT) From: Matt Benson Subject: Re: Loading files into concat in a certain order To: Ant Users List In-Reply-To: <6f7401650707231956x272917epb097ea8dca311921@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <257631.47519.qm@web55104.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --- Alex Egg wrote: > I'm looking at the (dismal) ant docs on resources > and sort, but I can't > figure out how to use it on my file set: > > includes="*.css"/> > > > I just want to sort those files by name so they go > into concat alphabeticly. > My files are named 1styles.css, 2styles.css, > 3styles.css, etc... > > How can I do this? As the docs say, operates on a nested resource collection, here your fileset: This will sort the resources according to their natural sort order. In this case your sorted resource collection is a fileset, thus you know it contains only file resources. These will be sorted according to the underlying File objects' natural sort order, which should accomplish what you want. If there was some other order you wanted to impose you should be able to specify nested comparators as described in the documentation; the caveat referenced in the doc is that the built-in resource comparators are "stored" in an "internal" antlib to avoid namespace collisions with other, similar types, e.g.: Does that help? -Matt P.S. feel free to submit documentation enhancements once, as a user, you have arrived at an example you feel might be useful to prevent others encountering the same confusion you did! > > Alex > > On 7/23/07, Matt Benson > wrote: > > > > > > --- Alex Egg wrote: > > > > > I need to load some CSS files into the concat > task, > > > but they need to be a > > > certain order. How should I do this? Maybe > number > > > the file names? Is there > > > any build in fileset functionality for this? > > > Alex > > > > > > > In Ant 1.7+, you can use any resource collection > with > > . If you need to specify an arbitrary > order, > > use a or a collection. If you > can > > sort them in some way, look at the resource > > collection. > > > > HTH, > > Matt > > > > > > > > > ____________________________________________________________ > > ________________________ > > Pinpoint customers who are looking for what you > sell. > > http://searchmarketing.yahoo.com/ > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > > For additional commands, e-mail: > user-help@ant.apache.org > > > > > ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org