How to keep file order in Ant concat?
A simple concat with a set of files and an includefile produces a rather "random" order, since the order is not guaranteed:
<concat destfile="C:/targetdir/concatenated.file"> <fileset dir="C:/sourcedir/"> <includesfile name="C:/targetdir/includes.file" /> </fileset> </concat>
I need concatenation in a certain order that the files are listed in the include file.
So far, I have found a resourcelist that should keep order, but I seem to be unable to create any concatenated file with it.: /
<concat destfile="C:/targetdir/concatenated.file"> <resourcelist> <file file="C:/targetdir/includes.file"/> <filterchain> <striplinecomments> <comment value="#"/> </striplinecomments> <prefixlines prefix="C:/sourcedir/"/> </filterchain> </resourcelist> </concat>
In addition, the resourcelist cannot process strings such as
LibraryX/A/Stuff/Morestuff/*
Instead of a line, it simply creates "... / Seaworld / * does not exist." -error
Includes a list of relative paths in its file:
LibraryX/A/Stuff/FileA.txt LibraryX/A/Stuff/FileB.txt LibraryX/A/Stuff/FileC.txt LibraryX/A/Stuff/FileY.txt
source share