----- Original Message -----
From: "Will Hartung" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 10, 2001 10:07 PM
Subject: auto-building a classpath
> Hi all,
>
> I'm curious if there is a way to automatically create a classpath.
>
> Specifically, we have a directory that we like to put all of our 3rd party
> jars into for the build, and I was wondering if there is some way that ANT
> can "look" at the directory, and just add all of the jars to the
classpath.
>
Yes, simply add
<classpath>
<fileset dir="myLibDir">
<include name="**/*.jar" />
</fileset>
</classpath>
to your javac-task. You will get something like this:
<javac srcdir="src"
destdir="classes"
debug="off" optimize="on">
<classpath>
<fileset dir="${build.lib}">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
As an alternative you can define the classpath as path on the project level,
add an 'id="myClasspath"' to the path and use it as "<classpath
refid="myClasspath"/> in every javac-task.
Nico