R
robin
Hi,
Can anyone help me with what is hopefully a simple ant related
question? I think I may need to write a custom task, but what I am
trying to do seems simple and I may be overlooking a built-in
solution.
I am working with an ant based build system that packages a list of
resources into a jar file at build time. These consist of a number of
properties files and a certificates.
The build system creates builds for developer workstations, test
systems, and production systems. The location of the resource files
differs depending on which of these are being built, and where the
build is happening. I want to be able to specify the list of files
explicitly, naming each file rather than using wild-cards primarily so
that if files are missing the build can break.
I only want to specify the list of names once because otherwise people
will inevitably fail to update some of the places where the names are
repeated leading to wasted developer time.
I don't seem to be able to use <copy> with a <fileset> because that
won't fail if some of the files aren't found, and the base directory
must be specified, so I can't reuse the list in the different
contexts.
Currently the system uses just a comma separated list combined with a
<for> task and a <copy>. This is functional however the list cannot
have any whitespace in it and so leads to a very long and hard to read
line, or a very clumsy construction of a bigger properties list out of
a list of smaller lists.
At the moment, it seems to me that I need to extend with a 'lexical
list' or 'name list' kind of data structure, and a new kind of copy
task that can construct real paths from such a list by combining the
names with a path.
Do any ant experts out there have any opinions on this?
Thanks in advance.
-Robin
Can anyone help me with what is hopefully a simple ant related
question? I think I may need to write a custom task, but what I am
trying to do seems simple and I may be overlooking a built-in
solution.
I am working with an ant based build system that packages a list of
resources into a jar file at build time. These consist of a number of
properties files and a certificates.
The build system creates builds for developer workstations, test
systems, and production systems. The location of the resource files
differs depending on which of these are being built, and where the
build is happening. I want to be able to specify the list of files
explicitly, naming each file rather than using wild-cards primarily so
that if files are missing the build can break.
I only want to specify the list of names once because otherwise people
will inevitably fail to update some of the places where the names are
repeated leading to wasted developer time.
I don't seem to be able to use <copy> with a <fileset> because that
won't fail if some of the files aren't found, and the base directory
must be specified, so I can't reuse the list in the different
contexts.
Currently the system uses just a comma separated list combined with a
<for> task and a <copy>. This is functional however the list cannot
have any whitespace in it and so leads to a very long and hard to read
line, or a very clumsy construction of a bigger properties list out of
a list of smaller lists.
At the moment, it seems to me that I need to extend with a 'lexical
list' or 'name list' kind of data structure, and a new kind of copy
task that can construct real paths from such a list by combining the
names with a path.
Do any ant experts out there have any opinions on this?
Thanks in advance.
-Robin