Try
<path id="project.classpath">
<pathelement path="classes" />
<fileset dir="lib">
<include name="*.jar" />
<include name="*.zip" />
</fileset>
</path>
Then
<javac srcdir="src" destdir="classes" includes="**/*.java">
<classpath refid="project.classpath" />
</javac>
Matthew.
Matthew.
--
[EMAIL PROTECTED]
Senior Software Engineer,
EVIS Group, Information Technology Division,
Defence Science and Technology Organisation.
> -----Original Message-----
> From: burtonator [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 25 July 2001 11:17 AM
> To: [EMAIL PROTECTED]
> Subject: Automatically importing a directory of .jar files.
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hey.
>
> I want to make it easy for my projects to be downloaded and
> built without any
> major CLASSPATH hacks. I am putting all my .jar files into
> PROJECT/lib but I am
> hving to manually add EACH .jar into the "classpath"
> attribute on the javac
> task.
>
> It would make sense to just do a
>
> <import-classpath dir="../lib"/>
>
> And then run javac like:
>
> <javac classpath="${CLASSPATH}
>
> The ImportClasspath taskdef would read all .jar files form
> the given directory
> and add them to the classpath.
>
> Doesn't this seem more "clean" than manually adding each
> classpath entry? Has
> anyone attempted a Taskdef like this?
>
> Kevin
>
> - --
> Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED],
> [EMAIL PROTECTED] )
> Cell: 408-910-6145 URL: http://relativity.yi.org ICQ:
> 73488596
>
> Without enlightenment, there is only ignorance.
> -- famous Zen Koan
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
>
> iD8DBQE7XiUaAwM6xb2dfE0RApgHAJ9tkzO2BxXH/xB0q8lF/j5ZscJrDwCeMsV8
> xOYiWLtQ5CYQD+9GN5XzBUI=
> =UJCP
> -----END PGP SIGNATURE-----
>