You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Cooper <ma...@microlise.com> on 2003/01/22 15:30:01 UTC

Ant and paths

OK, I'm sure this must have come up before, but after trawling through the
archives for what seems like days, I've not seen an answer to this that
satisfies the problem.

What I need to be able to do is supply a path (delimited string of
directory names), and an 'includes' patternset and for Ant to be able to
construct from this a path consisting of absolute (or relative from build
root) pathnames of the matching files separated by whatever the OS path
separator is. An obvious example is to be able to set a path consisting of
the locations where executable jar files reside, and for an Ant task to
then construct a <classpath> containing the absolute paths including
filenames of every jar and zip file in the supplied locations.

The reason for doing this is so that individual developers can store their
third party components in any drive/directory structure they choose, and be
able to supply (as a property or environment variable) a path and let Ant
resolve it to include all of the zip and jar files.

What I would like to see is something like:
<classpath id="my-classpath" >
      <pathelement path="${SuppliedDirectoryPath}" includes="**/*.jar,
**/*.zip"/>
</classpath>

Any ideas?

Mark Cooper




Any views or opinions presented in this Email message are solely those of
the author and do not necessarily represent those of the Microlise Group
unless otherwise specifically stated.
Email communications are not necessarily secure and therefore the Microlise
Group does not accept legal responsibility for the contents of this
message.

If you are not the intended recipient and have received this message in
error, please notify Microlise immediately.

Microlise Group Limited +44 (0)1773 537000




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>