I want to change the base directory of a FileList
when referencing it later in my buildfile.
I define the following FileList
:
<filelist dir="./dev" id="sourceFiles">
<file name="files/file.php" />
<file name="files/class.php" />
<file name="files/functions.php" />
</filelist>
And my targets are the following
<target name="fetch">
<copy todir="./src/files">
<filelist refid="sourceFiles" />
</copy>
</target>
<target name="build" depends="fetch">
<replaceregexp match="(\d+.\d+.\d+)(.\d+)?" replace="\1.${build.number}">
<filelist refid="sourceFiles" />
</replaceregexp>
</target>
So, when using the replaceregexp
task, it will use the files located in ./dev
- but I want the task to replace in the files copied earlier that are now located in ./src
.
Of course, I could copy the file list and use another dir
, but I'd very much like to only hold the list of files once in my buildfile.
How can I achieve this?