No need for <printpath>. Simply do <property name="fooPath" refid="foo"/>.
Study the output of running Ant with the -verbose (or -debug if you can stomach it) switch. That'll show you what <javac> is doing. By default, <javac> also includes the classpath it runs with (the one used by the Java VM running Ant, which is the current classpath of your environment, extended with all the jars/zips in $ANT_HOME/lib). See the 'includeAntRuntime' and 'includeJavaRuntime' attributes of <javac> for details. If you can't find anything, then send it, and maybe someone will help with it. --DD -----Original Message----- From: William E. Kempf [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 3:28 PM To: Ant Users List Subject: Re: Building a Classpath ----- Original Message ----- From: "Dominique Devienne" <[EMAIL PROTECTED]> To: "'Ant Users List'" <[EMAIL PROTECTED]> Sent: Monday, July 22, 2002 2:43 PM Subject: RE: Building a Classpath > OK, I think I've got it this time: > > String idname = "myid"; > Path path = new Path(getProject(), classpath); > getProject().addReference(idname, path); > > Let me know. --DD Thanks. This has gotten me closer. The path appears to construct properly. Problem is, the <javac> task is failing for classpath reasons. Here's basically what I have in my ant script: <target name="compile" depends="init"> <parseclasspath id="foo"/> <javac destdir="${build.dir}" debug="${build.debug}" srcdir="${src.dir}"> <classpath refid="foo"/> <include name="**/*.java"/> </javac> </target> As a debugging aid I've created a custom Ant task that prints the elements of a Path and added the following line after the <parseclasspath> above: <printpath refid="foo"/> This shows me all the classpath elements I'd expect to see. Any ideas on why it doesn't appear to work in the <javac> task? Bill Kempf -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
