----- Original Message -----
From: "K Plummer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 22, 2001 1:35 AM
Subject: Ant 1.2 javac classpath and classpath reference problems.
> I using ANT 1.2 (WNT/W2KPRO)and Javasoft 1.3.0c and seem to be
> having problems getting the JAVAC task to take the classpath. I first
tried
> using a
> CLASSPATH reference giving the ID. Didn't seem to work, but I wasn't
> sure I understand the syntax so....
>
> Next, I tried setting the classpath property and then
> using the classpath="${classpath}" construction in the javac.
> Also appeared not to work.
>
It would be helpful if you post the snippets from your build.xml that don't
work the way you thought they should.
For example (with Ant 1.3, don't know if it will work with Ant 1.2, but it
should)
<?xml version='1.0' encoding='ISO-8859-1' ?>
<project name="test" default="compile" basedir=".">
<property name="lib.dir" value="lib"/>
<property name="src.dir" value="src"/>
<property name="classes.dir" value="classes"/>
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="compile">
<javac srcdir="${src.dir}"
destdir="${classes.dir}">
<classpath refid="classpath"/>
</javac>
</target>
</project>
will compile all the source in the sub-directory "src" into the
sub-directory "classes". The classpath will consist of all the jar files
that are in the sub-directory "lib".
Nico