Let's see... This might do the job:
<project>
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<echo file="unsorted.properties">a.name=a
d.name=d
c.name=c
b.name=b</echo>
<loadfile srcfile="unsorted.properties"
property="unsorted"/>
<sortlist property="sorted" value="${unsorted}"
delimiter="${line.separator}"/>
<echo file="sorted.properties">${sorted}</echo>
</project>
I have posted similar example in [1]. The thread was
started by a developer that wanted to write and
contribute a filter that does the sorting.
I haven't mastered FilterReaders at that time, but now
I think a sorting FilterReader is the pure Ant way of
doing it.
HTH Ivan
[1]http://marc.theaimsgroup.com/?l=ant-user&m=110061125804348&w=2
--- Nicolas Vervelle <[EMAIL PROTECTED]>
wrote:
> Ok, thanks
>
> but I want to sort the property file and save it. Is
> it possible ?
>
> Nicolas
>
> Ivan Ivanov wrote:
>
> >Nicolas,
> >Ant-Contrib has <sortlist> task[1] which can sort
> >properties files.
> >
> >HTH Ivan
> >
>
>[1]http://ant-contrib.sourceforge.net/tasks/tasks/sortlist.html
> >
> >--- Nicolas Vervelle <[EMAIL PROTECTED]>
> >wrote:
> >
> >
> >>Hi,
> >>
> >>I have a property file that is generated by
> >><modified> in a <fileset>.
> >>I would like to sort its content so that the files
> >>in it are sorted by
> >>directory.
> >>Is it possible ?
> >>
> >>Nicolas
> >>
> >>
> >>
> >>
> >>
> >>
>
>---------------------------------------------------------------------
> >
> >
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Small Business - Try our new resources site!
> >http://smallbusiness.yahoo.com/resources/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
> >
>
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]