ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: how to use the sort in resource
Date Wed, 21 Mar 2007 12:34:50 GMT
Hi Kriss--as with many OSS tools, the best examples
are in the testsuite ;).  The tricky thing, IMO, about
resource comparators/selectors is that in order to
avoid namespace conflicts with other similarly-named
entities they were placed in an internal antlib and
only available via that antlib or explicit typedefs. 
You should be able to do this:

<sort>
  <fileset dir="foo" />
  <reverse
xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
    <!-- date inherits reverse's ns -->
    <date />
  </reverse>
</sort>

HTH,
Matt

--- Kriss <madrockriss@hotmail.com> wrote:

> HI,
> 
> The new resource possibility in ant 1.7.0 seems to
> be excellent, but I do not know how to use it. For
> instance, I want to build a fileset of files sorted
> by their date in reverse order.
> 
> I know there is the new sort
>
http://ant.apache.org/manual/CoreTypes/resources.html#sort
> with the resource comparator :
> - date :
>
http://ant.apache.org/manual/CoreTypes/resources.html#rcmp.date
> - reverse :
>
http://ant.apache.org/manual/CoreTypes/resources.html#rcmp.reverse
> 
> But I cannot find any exemple about how to use this,
> Any help will be appreciate.
> 
> Thanks.
> Kriss
> 



 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message