Posted By:
Alex_Tang
Posted On:
Tuesday, November 12, 2002 11:05 PM
Hi folks. I want to traverse a tree, reading information from files within the tree to create a "list" of information. What i'm eventually trying to do is perform a "jar" task using the include parameter, however i need to generate the value of include from information stored in the tree. Is there an ant task that will read information from a file and place that information in a property? Is there a way to do this recursively? Here's an example of what i'm trying to do: In my build environment, i am building a jar file from my source tree. For example, i have the following source tree: com tango dir1 filelist
More>>
Hi folks.
I want to traverse a tree, reading information from files within the tree to create a "list" of information.
What i'm eventually trying to do is perform a "jar" task using the
include
parameter, however i need to generate the value of
include
from information stored in the tree.
Is there an ant task that will read information from a file and place that information in a property? Is there a way to do this recursively?
Here's an example of what i'm trying to do:
In my build environment, i am building a jar file from my source tree. For example, i have the following source tree:
com
tango
dir1
filelist
A.java
B.java
C.java
dir2
filelist
D.java
E.java
F.java
the file called "filelist" contains information about which file's corresponding "class" files belong in the jar file.
let's say that the two
filelist
files from above define the following jar file makeup:
The files: A.class, B.class, and E.class go in the jar file
Mind you that this can not be represented by any pattern or wildcard set.
I want to walk the tree and look in each
filelist
file. take the contents read from each file and append that information to a property. Then use that property in a
jar
task.
Is there any way to do this?
Thanks.
...alex...
<<Less