ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: includesfile in fileset is not respecting order
Date Thu, 03 Feb 2011 10:13:42 GMT
On 2011-02-03, kwooda wrote:

> I am iterating over files listed in an includesfile file and they need
> to be processed in the order that they are specified, but instead they
> are being processed in alphanumeric order.  Why is this sorting
> occurring, and how do I get around it?

It is not includesfile that doesn't preserve the sorting, it is the
fileset.  filesets are unordered and may change order while you don't
look at them (in reality this statement isn't true, but you better use
filesets if it was true).

If you need something sorted you can use a filelist or a path or wrap
the whole thing into a sort resource collection.

> 	<concat destfile="${jsDeployDir}/${libname}-debug.js" fixlastline="true"
> append="false">
> 		<fileset dir="${tempClientDir}" includesfile="${filename}"
> casesensitive="false" />
> 	</concat>

filelist doesn't have an includesfile attribute, nor has path.
<resourcelist> has, so this could become

 	<concat destfile="${jsDeployDir}/${libname}-debug.js"
               fixlastline="true" append="false">
            <file file="${filename}"/>
            <prefixlines prefix="${tempClientDir}/"/>

The prefixlines is necessary so you can use relative file names in your
includesfile.  If you are able to use absolute file names in there you
can just get rid of the filter.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message