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">
          <resourcelist>
            <file file="${filename}"/>
            <prefixlines prefix="${tempClientDir}/"/>
          </resourcelist>
        </concat>

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.

Stefan

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

Reply via email to